dotfiles/nvim/plugin/files.vim

12 lines
314 B
VimL
Raw Normal View History

2021-07-09 13:21:24 +00:00
" 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'))