From 6f1d9ec580188a9585d21d193a97f262e800b3d6 Mon Sep 17 00:00:00 2001 From: Max Christian Pohle Date: Sat, 15 Oct 2016 04:03:40 +0200 Subject: Conditional -Key When NERDTree has the focus: Jump to the file, but when the file has the focus, jump to the next buffer. --- vimrc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'vimrc') diff --git a/vimrc b/vimrc index 8050640..418ce26 100644 --- a/vimrc +++ b/vimrc @@ -72,9 +72,15 @@ set statusline+=%* let g:LatexBox_latexmk_preview_continuously = 1 let g:LatexBox_viewer = "evince" let g:syntastic_always_populate_loc_list = 1 -let g:syntastic_auto_loc_list = 1 +let g:syntastic_auto_loc_list = 0 let g:syntastic_check_on_open = 1 let g:syntastic_check_on_wq = 0 +let g:syntastic_quiet_messages = {"type":"style"} " filter (=do not display) style/formatting errors and warnings +" Syntastic +let g:syntastic_error_symbol = '✖' +let g:syntastic_style_error_symbol = '✗' +let g:syntastic_warning_symbol = '➔' +let g:syntastic_style_warning_symbol = '≈' Plug 'davidhalter/jedi-vim' " jedi gets used to display python function signatures let g:jedi#completions_enabled = 0 " we do not need completions, because we have YouCompleteMe @@ -124,13 +130,16 @@ inoremap "inoremap vnoremap < >gv| " allows indenting a selected block and keeps selection -nnoremap :bn| " lets one use (CTRL+)Tab to switch between buffers -nnoremap :bp| " use (CTRL+)Shift+Tab to switch to previous buffers +" 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 +nnoremap bufname("%")=='NERD_tree_1' ? '' : ':bn' +nnoremap bufname("%")=='NERD_tree_1' ? '' : ':bp' inoremap | " Bind CTRL+Backspace to vims version (CTRL+W) in insert mode " settings ============================================. " set shell=/bin/bash | " many scripts rely on bash, but its path varies why it is commented out here +set mouse=a | " also supported by vim, should be default set noshowmode | " because we are using some powerline derivat set hidden | " allows switiching buffers even if the current buffer contains changes (displays +) set confirm | " asks 'do you want to save?' -- cgit v1.2.3