commit 86364c21505ece4d5f6f509215efe7b159d1502a
parent 2dd198c6c412b4ddd361b43586b01981e8383239
Author: Kamil K. LemaĆski <kamil.lemanski@gmail.com>
Date: Fri, 5 Aug 2011 17:42:41 +0300
wycats's "disallow insert mode"
https://github.com/wycats/nerdtree/commit/3bb112d916a3e78f2e6528b869cdad1f7d826114
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim
@@ -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)