How to open or close NERDTree and Tagbar with \?

You need to use a function that checks whether the plugin windows are open or not and then acts accordingly. This should work and will also jump back to the window that you started in.

You need to use a function that checks whether the plugin windows are open or not and then acts accordingly. This should work and will also jump back to the window that you started in: function! ToggleNERDTreeAndTagbar() let w:jumpbacktohere = 1 " Detect which plugins are open if exists('t:NERDTreeBufName') let nerdtree_open = bufwinnr(t:NERDTreeBufName)!

= -1 else let nerdtree_open = 0 endif let tagbar_open = bufwinnr('__Tagbar__')! = -1 " Perform the appropriate action if nerdtree_open && tagbar_open NERDTreeClose TagbarClose elseif nerdtree_open TagbarOpen elseif tagbar_open NERDTree else NERDTree TagbarOpen endif " Jump back to the original window for window in range(1, winnr('$')) execute window . 'wincmd w' if exists('w:jumpbacktohere') unlet w:jumpbacktohere break endif endfor endfunction nmap \ :call ToggleNERDTreeAndTagbar().

Oooh lovely! Works perfectly. And thanks for the "jump back to the original window feature".

Was also what I was looking for – Christian Fazzini Jul 10 at 14:15.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions