diff options
| -rw-r--r-- | vimrc | 30 |
1 files changed, 15 insertions, 15 deletions
| @@ -17,23 +17,20 @@ Plug 'scrooloose/nerdtree' | " replace NetRW, which i | |||
| 17 | set winwidth=30 " keep NERDTreeWindow at least this size | 17 | set winwidth=30 " keep NERDTreeWindow at least this size |
| 18 | set winminwidth=30 " (and all other windows, so TODO: watch out) | 18 | set 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: |
| 21 | nnoremap <expr> | 21 | nnoremap <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) | ||
| 26 | autocmd 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 | ||
| 31 | nnoremap <expr> | 24 | nnoremap <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>' |
| 34 | nnoremap <expr> | 27 | nnoremap <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) | ||
| 31 | autocmd bufenter * | ||
| 32 | \ if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif | ||
| 33 | |||
| 37 | 34 | ||
| 38 | " AIRLINE: ===========================================. | 35 | " AIRLINE: ===========================================. |
| 39 | Plug 'vim-airline/vim-airline' | " beautification of the mode line | 36 | Plug '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: ========================================. |
| 66 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages | 63 | Plug 'sheerun/vim-polyglot' " better syntax highlighting/indentation for multiple languages |
| 67 | Plug 'taglist-plus' " quick code navigator | 64 | Plug 'majutsushi/tagbar' " superseeds taglist-plus, which isn't maintained any more |
| 68 | let g:Tlist_Use_Right_Window = 1 | 65 | let g:tagbar_autoclose = 1 |
| 69 | nnoremap <leader>l :TlistToggle<CR>| " bind TagList to Hotkey Ctrl+L | 66 | let g:tagbar_autofocus = 1 |
| 67 | let g:tagbar_compact = 1 | ||
| 68 | let g:tagbar_indent = 0 | ||
| 69 | nnoremap <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- | |||
| 197 | set ttyfast | " improves speed for terminal vim | 197 | set ttyfast | " improves speed for terminal vim |
| 198 | set ttyscroll=100 | " improves speed for terminal vim | 198 | set ttyscroll=100 | " improves speed for terminal vim |
| 199 | set writedelay=0 | 199 | set writedelay=0 |
| 200 | set 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 | ||
| 202 | if has("multi_byte") | 202 | if 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 |
