From 66feb50780e0ea135e2eb9dd2bc87ef1b4febcc2 Mon Sep 17 00:00:00 2001 From: Duff OMelia Date: Wed, 1 Dec 2021 14:03:55 -0500 Subject: [PATCH] NERDTree tweak --- .vimrc | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.vimrc b/.vimrc index 5e8c24a..acdf08c 100644 --- a/.vimrc +++ b/.vimrc @@ -160,15 +160,13 @@ nmap C :source $MYVIMRC:source $MYGVIMRC:exe "echo 'vimrc & gvim " -------------------------------------------------- " Show/hide nerdtree " -------------------------------------------------- -nnoremap d :NERDTreeClose -nnoremap D :NERDTree +nnoremap d g:NERDTree.IsOpen() ? ':NERDTreeClose' : ':NERDTree' " -------------------------------------------------- " Highlight the current buffer in the nerdtree " -------------------------------------------------- nnoremap n :NERDTreeFind - " -------------------------------------------------- " Move between windows " --------------------------------------------------