diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-05 00:24:01 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2017-11-05 00:24:01 +1300 |
commit | ddc18dc0c61b4e50775b7937e10c6059df47b1d8 (patch) | |
tree | 94e10948f08368d41433e655ba7915b4fc6e54dc /vim | |
parent | Merge branch 'feature/space-dots' into develop (diff) | |
parent | Limit search highlighting hooks to Vim >= 7.1 (diff) | |
download | dotfiles-ddc18dc0c61b4e50775b7937e10c6059df47b1d8.tar.gz dotfiles-ddc18dc0c61b4e50775b7937e10c6059df47b1d8.zip |
Merge branch 'feature/vim61-backport' into develop
* feature/vim61-backport:
Limit search highlighting hooks to Vim >= 7.1
Add explanatory note for choosing imperfect remap
Diffstat (limited to 'vim')
-rw-r--r-- | vim/config/search.vim | 2 | ||||
-rw-r--r-- | vim/config/substitution.vim | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/vim/config/search.vim b/vim/config/search.vim index a3aba989..ff243116 100644 --- a/vim/config/search.vim +++ b/vim/config/search.vim @@ -22,7 +22,7 @@ if has('extra_search') " Clear search highlighting as soon as I enter insert mode, and restore it " once I leave it - if has('autocmd') + if has('autocmd') && v:version >= 701 augroup dotfiles_highlight autocmd! autocmd InsertEnter diff --git a/vim/config/substitution.vim b/vim/config/substitution.vim index f2d7b665..415665ef 100644 --- a/vim/config/substitution.vim +++ b/vim/config/substitution.vim @@ -3,6 +3,9 @@ nnoremap <silent> \ & \ :<C-U>&&<CR> -xnoremap <silent> + +" Same again for visual mode; we use vnoremap rather than xnoremap to stay +" compatible with old Vims without doing eval() dances +vnoremap <silent> \ & \ :<C-U>&&<CR> |