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(-)

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 <expr>
       \ <leader><leader>
-      \ !exists("b:NERDTree") ? ':NERDTreeFocus<CR>' : ':NERDTreeClose<CR>'
-
-" 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 <Tab> should jump to the next window, but if the file
-" buffer is selected <Tab> should select the next buffer (:bn). That is archived by :h map-expr
+      \ bufwinnr("%")==g:NERDTree.GetWinNum() ? ':NERDTreeClose<CR>' : ':NERDTreeCWD<CR>'
 nnoremap <expr>
       \ <Tab>
-      \ bufname("%")=='NERD_tree_1' ? '<C-W><C-W>' : ':bn<CR>'
+      \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '<C-W><C-W>' : ':bn<CR>'
 nnoremap <expr>
       \ <S-Tab>
-      \ bufname("%")=='NERD_tree_1' ? '<C-W><C-W>' : ':bp<CR>'
+      \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '<C-W><C-W>' : ':bp<CR>'
+" 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 <leader>l :TlistToggle<CR>|                      " 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 <leader>l :TagbarToggle<CR>|                 " 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