aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorMax Christian Pohle2016-10-18 17:48:03 +0200
committerMax Christian Pohle2016-10-18 17:48:03 +0200
commite8693d549f7fbd922efb0659a8cd2c8e7d80e2ed (patch)
treef5aa8793fc799d070b903853c0506e340bccc401 /vimrc
parent87271db105e429a402b8934259b2390d55ac7481 (diff)
downloadvim-karlmarks-e8693d549f7fbd922efb0659a8cd2c8e7d80e2ed.tar.bz2
vim-karlmarks-e8693d549f7fbd922efb0659a8cd2c8e7d80e2ed.zip
replaced taglist-plug with tagbar, fixed shortcut
Fixed custom shortcuts for NerdTree
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc30
1 files 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
17set winwidth=30 " keep NERDTreeWindow at least this size 17set winwidth=30 " keep NERDTreeWindow at least this size
18set winminwidth=30 " (and all other windows, so TODO: watch out) 18set winminwidth=30 " (and all other windows, so TODO: watch out)
19 19
20" open or focus the NERDTree with this key binding and close it if it is the active buffer... 20" depending on if NERDTree has the focus:
21nnoremap <expr> 21nnoremap <expr>
22 \ <leader><leader> 22 \ <leader><leader>
23 \ !exists("b:NERDTree") ? ':NERDTreeFocus<CR>' : ':NERDTreeClose<CR>' 23 \ bufwinnr("%")==g:NERDTree.GetWinNum() ? ':NERDTreeClose<CR>' : ':NERDTreeCWD<CR>'
24
25" close NERDTree if it is the last remaining window (taken from the official documentation)
26autocmd bufenter *
27 \ if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
28
29" if NERDTree has the focus, pressing <Tab> should jump to the next window, but if the file
30" buffer is selected <Tab> should select the next buffer (:bn). That is archived by :h map-expr
31nnoremap <expr> 24nnoremap <expr>
32 \ <Tab> 25 \ <Tab>
33 \ bufname("%")=='NERD_tree_1' ? '<C-W><C-W>' : ':bn<CR>' 26 \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '<C-W><C-W>' : ':bn<CR>'
34nnoremap <expr> 27nnoremap <expr>
35 \ <S-Tab> 28 \ <S-Tab>
36 \ bufname("%")=='NERD_tree_1' ? '<C-W><C-W>' : ':bp<CR>' 29 \ bufwinnr("%")==g:NERDTree.GetWinNum() ? '<C-W><C-W>' : ':bp<CR>'
30" close NERDTree if it is the last remaining window (taken from the official documentation)
31autocmd bufenter *
32 \ if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
33
37 34
38" AIRLINE: ===========================================. 35" AIRLINE: ===========================================.
39Plug 'vim-airline/vim-airline' | " beautification of the mode line 36Plug 'vim-airline/vim-airline' | " beautification of the mode line
@@ -64,9 +61,12 @@ let g:airline_theme='base16' | " specifies which colors
64 61
65" Additional: ========================================. 62" Additional: ========================================.
66Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages 63Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages
67Plug 'taglist-plus' " quick code navigator 64Plug 'majutsushi/tagbar' " superseeds taglist-plus, which isn't maintained any more
68let g:Tlist_Use_Right_Window = 1 65let g:tagbar_autoclose = 1
69nnoremap <leader>l :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L 66let g:tagbar_autofocus = 1
67let g:tagbar_compact = 1
68let g:tagbar_indent = 0
69nnoremap <leader>l :TagbarToggle<CR>| " bind TagBar to Hotkey Ctrl+L
70 70
71 71
72" Autocompleter: =====================================. 72" Autocompleter: =====================================.
@@ -197,7 +197,7 @@ set ttimeoutlen=10 | " set esc key timeout in ms-
197set ttyfast | " improves speed for terminal vim 197set ttyfast | " improves speed for terminal vim
198set ttyscroll=100 | " improves speed for terminal vim 198set ttyscroll=100 | " improves speed for terminal vim
199set writedelay=0 199set writedelay=0
200set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color) 200" set termguicolors | " When on, uses highlight-guifg and highlight-guibg attributes in the terminal (=24bit color)
201 201
202if has("multi_byte") 202if has("multi_byte")
203 scriptencoding utf-8 | " tell vim that we are using utf-8 here 203 scriptencoding utf-8 | " tell vim that we are using utf-8 here
..