wycats's "disallow insert mode"

3bb112d916
This commit is contained in:
Kamil K. Lemański 2011-08-05 17:42:41 +03:00
parent 2dd198c6c4
commit 86364c2150

View File

@ -66,6 +66,7 @@ call s:initVariable("g:NERDTreeShowFiles", 1)
call s:initVariable("g:NERDTreeShowHidden", 0)
call s:initVariable("g:NERDTreeShowLineNumbers", 0)
call s:initVariable("g:NERDTreeSortDirs", 1)
call s:initVariable("g:NERDTreeStopInsert", 0)
call s:initVariable("g:NERDTreeDirArrows", 0)
if !exists("g:NERDTreeSortOrder")
@ -169,6 +170,12 @@ command! -n=0 -bar NERDTreeFind call s:findAndRevealPath()
augroup NERDTree
"Save the cursor position whenever we close the nerd tree
exec "autocmd BufWinLeave ". s:NERDTreeBufName ."* call <SID>saveScreenState()"
if g:NERDTreeStopInsert
"disallow insert mode in the NERDTree
exec "autocmd BufEnter ". s:NERDTreeBufName ."* stopinsert"
endif
"cache bookmarks when vim loads
autocmd VimEnter * call s:Bookmark.CacheBookmarks(0)