From e8693d549f7fbd922efb0659a8cd2c8e7d80e2ed Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Tue, 18 Oct 2016 17:48:03 +0200 Subject: replaced taglist-plug with tagbar, fixed shortcut Fixed custom shortcuts for NerdTree --- vimrc | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index f9569e3..a6d90a1 100644 --- a/vimrc +++ b/vimrc @@ -17,23 +17,20 @@ Plug 'scrooloose/nerdtree' | " replace NetRW, which i set winwidth=30 " keep NERDTreeWindow at least this size set winminwidth=30 " (and all other windows, so TODO: watch out) -" open or focus the NERDTree with this key binding and close it if it is the active buffer... +" depending on if NERDTree has the focus: nnoremap \ - \ !exists("b:NERDTree") ? ':NERDTreeFocus' : ':NERDTreeClose' - -" close NERDTree if it is the last remaining window (taken from the official documentation) -autocmd bufenter * - \ if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif - -" if NERDTree has the focus, pressing should jump to the next window, but if the file -" buffer is selected should select the next buffer (:bn). That is archived by :h map-expr + \ bufwinnr("%")==g:NERDTree.GetWinNum() ? ':NERDTreeClose' : ':NERDTreeCWD' nnoremap \ - \ bufname("%")=='NERD_tree_1' ? '' : ':bn' + \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '' : ':bn' nnoremap \ - \ bufname("%")=='NERD_tree_1' ? '' : ':bp' + \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '' : ':bp' +" close NERDTree if it is the last remaining window (taken from the official documentation) +autocmd bufenter * + \ if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif + " AIRLINE: ===========================================. Plug 'vim-airline/vim-airline' | " beautification of the mode line @@ -64,9 +61,12 @@ let g:airline_theme='base16' | " specifies which colors " Additional: ========================================. Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages -Plug 'taglist-plus' " quick code navigator -let g:Tlist_Use_Right_Window = 1 -nnoremap l :TlistToggle| " bind TagList to Hotkey Ctrl+L +Plug 'majutsushi/tagbar' " superseeds taglist-plus, which isn't maintained any more +let g:tagbar_autoclose = 1 +let g:tagbar_autofocus = 1 +let g:tagbar_compact = 1 +let g:tagbar_indent = 0 +nnoremap l :TagbarToggle| " bind TagBar to Hotkey Ctrl+L " Autocompleter: =====================================. @@ -197,7 +197,7 @@ set ttimeoutlen=10 | " set esc key timeout in ms- set ttyfast | " improves speed for terminal vim set ttyscroll=100 | " improves speed for terminal vim set writedelay=0 -set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) +" set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) if has("multi_byte") scriptencoding utf-8 | " tell vim that we are using utf-8 here -- cgit v1.2.3