Skip to content

Break undos when calling Isurround #336

Open
@dyamon

Description

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions