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

Break undos when calling Isurround

dyamon opened this issue · comments

The idea is to change

inoremap <silent> <Plug>Isurround <C-R>=<SID>insert()<CR>
inoremap <silent> <Plug>ISurround <C-R>=<SID>insert(1)<CR>

to

inoremap <silent> <Plug>Isurround  <C-G>u<C-R>=<SID>insert()<CR>
inoremap <silent> <Plug>ISurround  <C-G>u<C-R>=<SID>insert(1)<CR>

to break undos to when inserting parenthesis.

This ended up in my configs since I almost always want this behaviour instead of undoing the whole insert action.

I'm proposing this because other people might want this behaviour. If you think this is not a sensible default, feel free to close this issue.