tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease

Home Page:https://www.vim.org/scripts/script.php?script_id=1697

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overwrite visual-mode `S` operator

wstevick opened this issue · comments

I want to configure this so that operators work the same in visual and insert mode. I want visual s to surround normally, and visual S to surround and indent the selected text. I have

vim.keymap.set('x', 's', '<Plug>VSurround')
vim.keymap.set('x', 'S', '<Plug>VgSurround')

But it overwrites S to be '<Plug>VSurround', which isn't helpful. How do I override this?