mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[nvim] Autoload project.vim files.
This commit is contained in:
parent
e7a5fc498e
commit
4e9ace97db
1 changed files with 11 additions and 0 deletions
11
nvim/plugin/files.vim
Normal file
11
nvim/plugin/files.vim
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
" Functions {{{
|
||||||
|
function! SourceIfExists(file)
|
||||||
|
if filereadable(expand(a:file))
|
||||||
|
exe 'source ' a:file
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
" }}}
|
||||||
|
|
||||||
|
" Automatically load project-specific config if present
|
||||||
|
let g:proj_root = finddir('.git/..', expand('%:p:h').';')
|
||||||
|
call SourceIfExists(expand(g:proj_root..'/project.vim'))
|
Loading…
Add table
Add a link
Reference in a new issue