vim: Add substitution binding for visual mode too

This commit is contained in:
2020-09-25 00:58:21 +02:00
parent 03e31ee636
commit b301cb5045

View File

@@ -67,11 +67,13 @@ nnoremap <leader>l <C-w><C-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<Left><Left><Left>
vnoremap S :s//gc<Left><Left><Left>
endif
" Interact with the system clipboard