Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin emulation for ReplaceWithRegister #2660

Closed
fredlebel opened this issue May 14, 2018 · 4 comments
Closed

Plugin emulation for ReplaceWithRegister #2660

fredlebel opened this issue May 14, 2018 · 4 comments

Comments

@fredlebel
Copy link

FEATURE REQUEST

Vim plugin ReplaceWithRegister is quite useful. Would it be possible to emulate it?

@tyru
Copy link
Contributor

tyru commented May 16, 2018

This supports only visual-mode, but the following config replaces selected text with register content without destroying register content.

    "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["g", "r"],
            "after": ["p", "g", "v", "y"]
        }
    ]

@modestotech
Copy link

This supports only visual-mode, but the following config replaces selected text with register content without destroying register content.

    "vim.otherModesKeyBindingsNonRecursive": [
        {
            "before": ["g", "r"],
            "after": ["p", "g", "v", "y"]
        }
    ]

Thanks for the advice, but how would this be used? Can't see how this mimics the ReplaceWithRegister plugin. If i copy something, I expect to write gr{motion} to delete {motion} and in its place insert what's in the register.

@J-Fields
Copy link
Member

Pull request is up at #3887 (not my work)

@kizza
Copy link
Contributor

kizza commented Jul 23, 2019

Thanks for hooking these together @J-Fields (I should have done an issue search!). I've updated the PR description to link to this issue 👍

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

No branches or pull requests

6 participants