From 93622b42f98b35efd6acc08ca25e43c26a1cea55 Mon Sep 17 00:00:00 2001 From: Kevin Date: Thu, 17 Apr 2014 12:18:26 -0400 Subject: [PATCH] Don't enable syntax highlighting in vimdiff, and since so few terminals support right clicking, the middle click now selects text between the cursor and mouse, and to enter input mode at the cursor, hold alt while middle clicking. --- vim/config/keyboard.vim | 12 +++++++----- vim/config/plugins.vim | 25 +++++++++++++++---------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/vim/config/keyboard.vim b/vim/config/keyboard.vim index 2addd0e..1f64b3e 100644 --- a/vim/config/keyboard.vim +++ b/vim/config/keyboard.vim @@ -43,11 +43,12 @@ " " Mappings: " (mouse) -" enter input mode where you click -" | (N) -> paste text from current buffer at cursor +" | (N) -> select text between the mouse and cursor +" | (N) -> enter input mode where you click +" | (N) -> paste text from current buffer at cursor " -" | (N) -> select the current line in normal mode -" | (I) -> select the current line in input mode +" | (N) -> select the current line in normal mode +" | (I) -> select the current line in input mode " " | (A) -> scroll right a few characters at a time " | (A) -> scroll left a few characters at a time @@ -251,7 +252,8 @@ "MAPPINGS: GENERAL KEYBINDINGS AND REBINDINGS {{{ "MOUSE:{ "midle click enters input mode - nnoremap i + nnoremap + nnoremap i nnoremap p "hold ctrl to scroll left/right instead of up/down diff --git a/vim/config/plugins.vim b/vim/config/plugins.vim index 6b017d1..95f305c 100644 --- a/vim/config/plugins.vim +++ b/vim/config/plugins.vim @@ -91,17 +91,22 @@ if !exists("g:autostartchecker") let g:autostartchecker=1 endif - if (g:autostartchecker == 1) - let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]} - let g:syntastic_check_on_open=1 - else - let g:syntastic_mode_map = {'mode':'passive','active_filetypes':[],'passive_filetypes':[]} - let g:syntastic_check_on_open=0 - endif - let g:syntastic_always_populate_loc_list=1 - let g:syntastic_auto_loc_list=1 - let g:syntastic_loc_list_height=5 + if &diff + let g:autostartchecker=0 + else + if (g:autostartchecker == 1) + let g:syntastic_mode_map = {'mode':'active','active_filetypes':[],'passive_filetypes':[]} + let g:syntastic_check_on_open=1 + else + let g:syntastic_mode_map = {'mode':'passive','active_filetypes':[],'passive_filetypes':[]} + let g:syntastic_check_on_open=0 + endif + + let g:syntastic_always_populate_loc_list=1 + let g:syntastic_auto_loc_list=1 + let g:syntastic_loc_list_height=5 + endif "}}} "TAGBAR: {{{