Skip to content

Commit

Permalink
Update vimrc
Browse files Browse the repository at this point in the history
Solve weird occasional error message.
See also: preservim/nerdtree#1411
  • Loading branch information
datMaffin committed May 12, 2024
1 parent 435eeb8 commit 319eae4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif

" Close vim when only NERDTree is opened
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
autocmd BufEnter * if winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | call feedkeys(":quit\<CR>:\<BS>") | endif

" Open NERDTree with ctrl-n
map <C-n> :NERDTreeToggle<CR>
Expand Down

0 comments on commit 319eae4

Please sign in to comment.