From 11e5a4f4b3aa1134585496a200eabce9d472e4fa Mon Sep 17 00:00:00 2001 From: wsdjeg Date: Sat, 15 Apr 2023 18:26:13 +0800 Subject: [PATCH] fix(nerdtree): fix nerdtree configuration close https://github.com/SpaceVim/SpaceVim/issues/4810 --- config/plugins/nerdtree.vim | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/config/plugins/nerdtree.vim b/config/plugins/nerdtree.vim index a39a502e6..6838614b1 100644 --- a/config/plugins/nerdtree.vim +++ b/config/plugins/nerdtree.vim @@ -38,7 +38,10 @@ function! s:nerdtreeinit() abort " nnoremap :silent! exe 'NERDTree' g:NERDTreeFileNode.GetSelected().path.str() nnoremap :call cursor(2, 1) nnoremap :call cursor(line('$'), 1) - doautocmd User NerdTreeInit + try + doautocmd User NerdTreeInit + catch + endtry endfunction function! s:paste_to_file_manager() abort