[Feature request] ability to specify register when yanking
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]yyand 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 whentype=Yank. -
let g:NerdYankRegister = x- Set default register used by NERDCommenterYank.
Contributions welcome. This doesn't really have an active maintainer right now but I'm trying to keep up with facilitating PRs when they come along.
Well, that was a learning opportunity! Opened #544 and would appreciate your feedback.