aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-08 23:48:48 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-08 23:48:48 +1200
commit6a1209adc7c3bede26376a90b2068d2801e391f8 (patch)
tree4f4817b65530a22d93e19b8f57c29d08196a89f2
parent6df8bea1857f54880dda016f30b170e42d15734b (diff)
downloaddotfiles-6a1209adc7c3bede26376a90b2068d2801e391f8.tar.gz
dotfiles-6a1209adc7c3bede26376a90b2068d2801e391f8.zip
Remap g& to preserve substitution flags
-rw-r--r--vim/vimrc3
1 files changed, 2 insertions, 1 deletions
diff --git a/vim/vimrc b/vim/vimrc
index 5d3bfc7a..d996e1c6 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -243,9 +243,10 @@ if &loadplugins " Don't change the mapping if we won't be loading the plugin
nmap <Space> <Plug>(ScrollNext)
endif
-" Remap normal/visual & to preserve substitution flags
+" Remap normal/visual & and g& to preserve substitution flags
nnoremap <silent> & :&&<CR>
xnoremap <silent> & :&&<CR>
+nnoremap <silent> g& :<C-U>%&&<CR>
" Map g: as a 'colon operator'
nmap g: <Plug>(ColonOperator)