From 86364c21505ece4d5f6f509215efe7b159d1502a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20K=2E=20Lema=C5=84ski?= Date: Fri, 5 Aug 2011 17:42:41 +0300 Subject: [PATCH] wycats's "disallow insert mode" https://github.com/wycats/nerdtree/commit/3bb112d916a3e78f2e6528b869cdad1f7d826114 --- plugin/NERD_tree.vim | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugin/NERD_tree.vim b/plugin/NERD_tree.vim index 738ab9e..7462735 100644 --- 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 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)