diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2014-09-21 13:26:50 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2014-09-21 13:26:50 -0300 |
commit | 018704444aef833b7c649559603dbd0184f1ad16 (patch) | |
tree | 2976c0aee5e8e84633a36e9441a1630aec91df99 /vimrc.dot.link | |
parent | c8f8ba8b02865c7825d16f076e96c3fb858156d5 (diff) | |
download | vim-018704444aef833b7c649559603dbd0184f1ad16.tar.gz vim-018704444aef833b7c649559603dbd0184f1ad16.tar.bz2 |
More logical NERDTree commands
Diffstat (limited to 'vimrc.dot.link')
-rw-r--r-- | vimrc.dot.link | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/vimrc.dot.link b/vimrc.dot.link index c3c61c5..f74003e 100644 --- a/vimrc.dot.link +++ b/vimrc.dot.link @@ -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> |