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)