aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-11-05 00:17:18 +1300
committerTom Ryder <tom@sanctum.geek.nz>2017-11-05 00:17:18 +1300
commitad7be7b50aebb03999fa3be38fc6fdde2899f7ba (patch)
tree3cf491600ce7c5f2efd56395886ac198e1a83be4
parentc213eec1cb25c07033b9164ad2054a7458e0def0 (diff)
downloaddotfiles-ad7be7b50aebb03999fa3be38fc6fdde2899f7ba.tar.gz
Add explanatory note for choosing imperfect remap
'vnoremap' also includes select mode, which I very seldom use anyway; in this context it's not worth breaking compatibility with old Vims to use the more accurate 'xnoremap'.
-rw-r--r--vim/config/substitution.vim5
1 files changed, 4 insertions, 1 deletions
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>