Skip to content

Feature: Add "duplicate" (yank, comment, paste) function? #70

@garymh

Description

@garymh

Would it be possible to add in a motion for "duplicating" text? I often (hopefully I'm not the only one) will yank and paste and a line/paragraph of code and then comment out the original so I can look at it for reference while I rework it. For example:

def cool_function(hello)
	puts hello
end

Typing something like gcd{motion} (ip here for a paragraph) would give us:

# def cool_function(hello)
# 	puts hello
# end

def cool_function(hello)
	puts hello
end

This was suggested as a feature with vim-commentary but I think it's still being discussed/considered: tpope/vim-commentary#42

It would be neat to see here too 😃

Love the plugin, btw!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions