Skip to content

Instantly share code, notes, and snippets.

@scrooloose
Created February 19, 2013 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scrooloose/4989844 to your computer and use it in GitHub Desktop.
Save scrooloose/4989844 to your computer and use it in GitHub Desktop.
function! NERDTreeFindOrToggle()
if nerdtree#treeExistsForTab()
NERDTreeToggle
else
NERDTreeFind
endif
endfunction
"then map something to it with
"nnoremap <leader>n :call NERDTreeFindOrToggle()<cr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment