From d727c42ee8733b31e63e8ee8214bef9fe179e550 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Sat, 20 Sep 2014 14:41:06 -0300 Subject: Easier way to open project tabs with nerdtree --- vimrc.dot.link | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'vimrc.dot.link') diff --git a/vimrc.dot.link b/vimrc.dot.link index 4f59ced..3255ed9 100644 --- a/vimrc.dot.link +++ b/vimrc.dot.link @@ -98,21 +98,27 @@ map m :q! " NERDTree section " Thanks to http://stackoverflow.com/questions/1447334/how-do-you-add-nerdtree-to-your-vimrc +" Open NERDTree when vim starts "autocmd VimEnter * NERDTree "autocmd VimEnter * wincmd p autocmd FileType nerdtree set relativenumber autocmd FileType taglist set relativenumber -" Shortcut to open tree from bookmark -cnoreabbrev NF NERDTreeFromBookmark +function TabNew(bookmark) + execute ":tabnew" + execute ":NERDTreeFromBookmark " a:bookmark +endfunction function OpenNERDTree() execute ":NERDTree" - endfunction - command -nargs=0 OpenNERDTree :call OpenNERDTree() +endfunction - nmap t :OpenNERDTree +" Shortcuts +cnoreabbrev O NERDTreeFromBookmark +command -nargs=1 -complete=customlist,nerdtree#completeBookmarks T :call TabNew() +command -nargs=0 OpenNERDTree :call OpenNERDTree() +nmap t :OpenNERDTree " See http://superuser.com/questions/10588/how-to-make-cut-copy-paste-in-gvim-on-ubuntu-work-with-ctrlx-ctrlc-ctrlv vmap "+yi -- cgit v1.2.3