]> gitweb.fluxo.info Git - rhatto/dotfiles/vim.git/commitdiff
More logical NERDTree commands
authorSilvio Rhatto <rhatto@riseup.net>
Sun, 21 Sep 2014 16:26:50 +0000 (13:26 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Sun, 21 Sep 2014 16:26:50 +0000 (13:26 -0300)
vimrc.dot.link

index c3c61c5f58c8348a9ad8d6536d572358ee528919..f74003ec82b683ffe7725c9fd3c186723000e138 100644 (file)
@@ -105,7 +105,12 @@ map m :q! <CR>
 autocmd FileType nerdtree set relativenumber
 autocmd FileType taglist  set relativenumber
 
-function TabNew(bookmark)
+function TabNew(address)
+  execute ":tabnew"
+  execute ":NERDTree " a:address
+endfunction
+
+function TabNewBookmark(bookmark)
   execute ":tabnew"
   execute ":NERDTreeFromBookmark " a:bookmark
 endfunction
@@ -115,9 +120,10 @@ function OpenNERDTree()
 endfunction
 
 " Shortcuts
-cnoreabbrev N NERDTree
-cnoreabbrev O NERDTreeFromBookmark
-command -nargs=1 -complete=customlist,nerdtree#completeBookmarks T :call TabNew(<f-args>)
+cnoreabbrev t NERDTree
+cnoreabbrev b NERDTreeFromBookmark
+command -nargs=1 -complete=dir T :call TabNew(<f-args>)
+command -nargs=1 -complete=customlist,nerdtree#completeBookmarks B :call TabNewBookmark(<f-args>)
 command -nargs=0 OpenNERDTree :call OpenNERDTree()
 nmap <ESC>t :OpenNERDTree<CR>