mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-23 00:37:33 +00:00
Fix bug
This commit is contained in:
parent
8ff7681f09
commit
c5892e0bf0
5
.gitignore
vendored
5
.gitignore
vendored
@ -1,6 +1,7 @@
|
|||||||
|
vim/.netrwhist
|
||||||
vim/autoload/plug.vim
|
vim/autoload/plug.vim
|
||||||
|
vim/backup/*~
|
||||||
vim/plugged/*
|
vim/plugged/*
|
||||||
vim/rc/*.local.rc.vim
|
vim/rc/*.local.rc.vim
|
||||||
vim/tmp/*.swp
|
|
||||||
vim/tmp/*.swo
|
vim/tmp/*.swo
|
||||||
vim/.netrwhist
|
vim/tmp/*.swp
|
||||||
|
@ -1,3 +1,15 @@
|
|||||||
|
function! s:smart_source_rc(name)
|
||||||
|
call s:source_rc(a:name . '.rc.vim')
|
||||||
|
call s:source_rc(a:name . '.local.rc.vim')
|
||||||
|
endfunction
|
||||||
|
|
||||||
|
function! s:source_rc(path)
|
||||||
|
let l:f_path = fnameescape(expand('~/.vim/rc/' . a:path))
|
||||||
|
if filereadable(l:f_path)
|
||||||
|
execute 'source' . l:f_path
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
|
||||||
" Navigation {{
|
" Navigation {{
|
||||||
Plug 'file-line'
|
Plug 'file-line'
|
||||||
Plug 'tpope/vim-vinegar'
|
Plug 'tpope/vim-vinegar'
|
||||||
@ -17,7 +29,7 @@ Plug 'sandeepcr529/Buffet.vim', { 'on': 'Bufferlist' }
|
|||||||
|
|
||||||
|
|
||||||
Plug 'ctrlpvim/ctrlp.vim'
|
Plug 'ctrlpvim/ctrlp.vim'
|
||||||
call g:source_rc('plugins/ctrlp.rc.vim')
|
call s:source_rc('plugins/ctrlp.rc.vim')
|
||||||
|
|
||||||
" ag / ack {{
|
" ag / ack {{
|
||||||
if executable('ag')
|
if executable('ag')
|
||||||
|
18
vimrc
18
vimrc
@ -7,12 +7,12 @@ if &compatible
|
|||||||
set nocompatible
|
set nocompatible
|
||||||
endif
|
endif
|
||||||
|
|
||||||
function! g:smart_source_rc(name)
|
function! s:smart_source_rc(name)
|
||||||
call g:source_rc(a:name . '.rc.vim')
|
call s:source_rc(a:name . '.rc.vim')
|
||||||
call g:source_rc(a:name . '.local.rc.vim')
|
call s:source_rc(a:name . '.local.rc.vim')
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function! g:source_rc(path)
|
function! s:source_rc(path)
|
||||||
let l:f_path = fnameescape(expand('~/.vim/rc/' . a:path))
|
let l:f_path = fnameescape(expand('~/.vim/rc/' . a:path))
|
||||||
if filereadable(l:f_path)
|
if filereadable(l:f_path)
|
||||||
execute 'source' . l:f_path
|
execute 'source' . l:f_path
|
||||||
@ -43,12 +43,12 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
|||||||
autocmd VimEnter * PlugInstall
|
autocmd VimEnter * PlugInstall
|
||||||
endif
|
endif
|
||||||
|
|
||||||
call g:source_rc('init.rc.vim')
|
call s:source_rc('init.rc.vim')
|
||||||
|
|
||||||
call plug#begin()
|
call plug#begin()
|
||||||
call g:smart_source_rc('plugins')
|
call s:smart_source_rc('plugins')
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
call g:smart_source_rc('edit')
|
call s:smart_source_rc('edit')
|
||||||
call g:smart_source_rc('keymap')
|
call s:smart_source_rc('keymap')
|
||||||
call g:smart_source_rc('ui')
|
call s:smart_source_rc('ui')
|
||||||
|
Loading…
Reference in New Issue
Block a user