diff options
author | Max Christian Pohle | 2016-10-15 04:03:40 +0200 |
---|---|---|
committer | Max Christian Pohle | 2016-10-15 04:03:40 +0200 |
commit | 6f1d9ec580188a9585d21d193a97f262e800b3d6 (patch) | |
tree | f21fabff4d5b627fd72445bf24315e8a2d0640a8 /vimrc | |
parent | 92f9cd82d1d5fcda96b0dc0ee78edb21f13e7743 (diff) | |
download | vim-6f1d9ec580188a9585d21d193a97f262e800b3d6.tar.bz2 vim-6f1d9ec580188a9585d21d193a97f262e800b3d6.zip |
Conditional <Tab>-Key
When NERDTree has the focus: Jump to the file, but when the file has the
focus, jump to the next buffer.
Diffstat (limited to 'vimrc')
-rw-r--r-- | vimrc | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -72,9 +72,15 @@ set statusline+=%* | |||
72 | let g:LatexBox_latexmk_preview_continuously = 1 | 72 | let g:LatexBox_latexmk_preview_continuously = 1 |
73 | let g:LatexBox_viewer = "evince" | 73 | let g:LatexBox_viewer = "evince" |
74 | let g:syntastic_always_populate_loc_list = 1 | 74 | let g:syntastic_always_populate_loc_list = 1 |
75 | let g:syntastic_auto_loc_list = 1 | 75 | let g:syntastic_auto_loc_list = 0 |
76 | let g:syntastic_check_on_open = 1 | 76 | let g:syntastic_check_on_open = 1 |
77 | let g:syntastic_check_on_wq = 0 | 77 | let g:syntastic_check_on_wq = 0 |
78 | let g:syntastic_quiet_messages = {"type":"style"} " filter (=do not display) style/formatting errors and warnings | ||
79 | " Syntastic | ||
80 | let g:syntastic_error_symbol = '✖' | ||
81 | let g:syntastic_style_error_symbol = '✗' | ||
82 | let g:syntastic_warning_symbol = '➔' | ||
83 | let g:syntastic_style_warning_symbol = '≈' | ||
78 | 84 | ||
79 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures | 85 | Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures |
80 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe | 86 | let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe |
@@ -124,13 +130,16 @@ inoremap <C-Space> <C-x><C-o> | |||
124 | "inoremap <C-@> <C-Space> | 130 | "inoremap <C-@> <C-Space> |
125 | vnoremap < <gv| " allows deindenting a selected block and keeps selection | 131 | vnoremap < <gv| " allows deindenting a selected block and keeps selection |
126 | vnoremap > >gv| " allows indenting a selected block and keeps selection | 132 | vnoremap > >gv| " allows indenting a selected block and keeps selection |
127 | nnoremap <Tab> :bn<CR>| " lets one use (CTRL+)Tab to switch between buffers | 133 | " if NERDTree has the focus, pressing <Tab> should jump to the next window, but if the file |
128 | nnoremap <S-Tab> :bp<CR>| " use (CTRL+)Shift+Tab to switch to previous buffers | 134 | " buffer is selected <Tab> should select the next buffer (:bn). That is archived by :h map-expr |
135 | nnoremap <expr> <Tab> bufname("%")=='NERD_tree_1' ? '<C-W><C-W>' : ':bn<CR>' | ||
136 | nnoremap <expr> <S-Tab> bufname("%")=='NERD_tree_1' ? '<C-W><C-W>' : ':bp<CR>' | ||
129 | inoremap <C-Backspace> <C-W>| " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode | 137 | inoremap <C-Backspace> <C-W>| " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode |
130 | 138 | ||
131 | 139 | ||
132 | " settings ============================================. | 140 | " settings ============================================. |
133 | " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here | 141 | " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here |
142 | set mouse=a | " also supported by vim, should be default | ||
134 | set noshowmode | " because we are using some powerline derivat | 143 | set noshowmode | " because we are using some powerline derivat |
135 | set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) | 144 | set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) |
136 | set confirm | " asks 'do you want to save?' | 145 | set confirm | " asks 'do you want to save?' |