Skip to content

Instantly share code, notes, and snippets.

@nakal
Created October 20, 2015 07:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nakal/190a0bebe410bfd69297 to your computer and use it in GitHub Desktop.
Save nakal/190a0bebe410bfd69297 to your computer and use it in GitHub Desktop.
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