Skip to content

Instantly share code, notes, and snippets.

@nakal
Created Oct 20, 2015
Embed
What would you like to do?
vimrc_local
" ***** Start project directory local vimrc files
let s:start_dir=getcwd()
while s:start_dir != '/' && empty(glob(s:start_dir . '/.git'))
let s:start_dir=fnamemodify( s:start_dir, ':h')
endwhile
if s:start_dir != '/'
let s:vimrc_path = s:start_dir . '/.vimrc'
if !empty(glob(s:vimrc_path))
execute 'source' s:vimrc_path
endif
let &tags = &tags . s:start_dir . '/tags'
" echohl ErrorMsg | echo 'Executed: ' . s:vimrc_path | echohl None
" sleep 1
endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment