From b301cb50452af75759e6f4115f1b813f30d203e6 Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Fri, 25 Sep 2020 00:58:21 +0200 Subject: [PATCH] vim: Add substitution binding for visual mode too --- .config/vim/vimrc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.config/vim/vimrc b/.config/vim/vimrc index 84c4224..a76924b 100644 --- a/.config/vim/vimrc +++ b/.config/vim/vimrc @@ -67,11 +67,13 @@ nnoremap l " Substitute command if (exists('+inccommand') && &inccommand != '') nnoremap S :%s/ + vnoremap S :s/ else " This does not work with live previewing commands (inccommand) since the " replace pattern is already defined and thus everything matching the search " pattern is just deleted. nnoremap S :%s//gc + vnoremap S :s//gc endif " Interact with the system clipboard