Skip to content

Option to retain cursor position #27

@amerlyq

Description

@amerlyq

How about plugin option to enclose mapped actions inside

old = getcurpos()
...
setpos('.', old+(append ? len(newleftblock) : delete ? -len(oldleftblock) : replace ? len(new)-len(old) : 0))

I understand, this feature will be greatly broken for some more-then-one letter blocks and even for some usecases of one-letter (like multiline append). But nevertheless it would be nice to keep position in much more often usecases for ({["'<.

Metadata

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