Skip to content

[Feature request] ability to specify register when yanking #543

Open
@jacktose

Description

@jacktose

NERDCommenterYank yanks to the default unnamed register "". Like all other yanking/pasting in vim, this is a good default, but it's also nice to be able to choose a register. One use case is creating a “comment and duplicate” function/mapping without clobbering the default register, as discussed in #435.

I don't know the internals or the right syntax, but from a UX perspective, I would hope for all of the following:

  • ["x][count]<leader>cy - Support standard register specification for NERDCommenterYank mapping, as with ["x]yy and friends.
  • ["x]<plug>NERDCommenterYank, <plug>NERDCommenterYank({register}), or similar way to specify a register when invoking this way (e.g. in a user-defined function or mapping).
  • NERDComment({mode}, {type}, [{register}]) - Specify register when type=Yank.
  • let g:NerdYankRegister = x - Set default register used by NERDCommenterYank.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions