mirror of
https://github.com/ViViDboarder/vim-settings.git
synced 2024-12-22 19:17:35 +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/backup/*~
|
||||
vim/plugged/*
|
||||
vim/rc/*.local.rc.vim
|
||||
vim/tmp/*.swp
|
||||
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 {{
|
||||
Plug 'file-line'
|
||||
Plug 'tpope/vim-vinegar'
|
||||
@ -17,7 +29,7 @@ Plug 'sandeepcr529/Buffet.vim', { 'on': 'Bufferlist' }
|
||||
|
||||
|
||||
Plug 'ctrlpvim/ctrlp.vim'
|
||||
call g:source_rc('plugins/ctrlp.rc.vim')
|
||||
call s:source_rc('plugins/ctrlp.rc.vim')
|
||||
|
||||
" ag / ack {{
|
||||
if executable('ag')
|
||||
|
18
vimrc
18
vimrc
@ -7,12 +7,12 @@ if &compatible
|
||||
set nocompatible
|
||||
endif
|
||||
|
||||
function! g:smart_source_rc(name)
|
||||
call g:source_rc(a:name . '.rc.vim')
|
||||
call g:source_rc(a:name . '.local.rc.vim')
|
||||
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! g:source_rc(path)
|
||||
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
|
||||
@ -43,12 +43,12 @@ if empty(glob('~/.vim/autoload/plug.vim'))
|
||||
autocmd VimEnter * PlugInstall
|
||||
endif
|
||||
|
||||
call g:source_rc('init.rc.vim')
|
||||
call s:source_rc('init.rc.vim')
|
||||
|
||||
call plug#begin()
|
||||
call g:smart_source_rc('plugins')
|
||||
call s:smart_source_rc('plugins')
|
||||
call plug#end()
|
||||
|
||||
call g:smart_source_rc('edit')
|
||||
call g:smart_source_rc('keymap')
|
||||
call g:smart_source_rc('ui')
|
||||
call s:smart_source_rc('edit')
|
||||
call s:smart_source_rc('keymap')
|
||||
call s:smart_source_rc('ui')
|
||||
|
Loading…
Reference in New Issue
Block a user