Permalink
Browse files

only load local vimrc for modifiable windows

  • Loading branch information...
1 parent 6e8766e commit 0b38cfab160ed9e2a3aa442dfc9604f440df0354 @cengebretson committed Apr 1, 2013
Showing with 11 additions and 7 deletions.
  1. +11 −7 vimrc
View
18 vimrc
@@ -1,4 +1,4 @@
-"--------------------------"
+e--------------------------"
" version 2.4 "
"--------------------------"
" last changed: 03/05/2013 "
@@ -408,13 +408,17 @@ endfunction
" If the file .vimrc exists in the root of a git project - load it
if !exists("*LoadLocalVimrc")
function! LoadLocalVimrc()
- " first jump to project root if it exists
- call FindProjectRoot()
+ " return if this is a nonmodifiable window
+ if (&modifiable == 1)
+
+ " first jump to project root if it exists
+ call FindProjectRoot()
- " check for local .lvimrc file
- let l:configFile = '.lvimrc'
- if filereadable(l:configFile)
- exec ":source " . l:configFile
+ " check for local .lvimrc file
+ let l:configFile = '.lvimrc'
+ if filereadable(l:configFile)
+ exec ":source " . l:configFile
+ endif
endif
endfunction
endif

0 comments on commit 0b38cfa

Please sign in to comment.