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

Feature request: A very handy command that yanks the line(s) before commenting. #468

Open
cmon1701 opened this issue Jun 13, 2024 · 2 comments

Comments

@cmon1701
Copy link

A very handy command that yanks the line(s) before commenting, so you can press p or P to insert the line (the way it was before) below or above.

Just like [count]cy |NERDCommenterYank|
[(https://github.com/preservim/nerdcommenter)]

@cmon1701
Copy link
Author

A partial solution (as it works only linewise):
["gC"] = { "yy<cmd>lua require('Comment.api').toggle.linewise.current()<cr>", "Yank and comment out" },
This is a map definition via WhichKey-Plugin.

@cmon1701
Copy link
Author

I think a good keymap for this would be gcy, (not gC as above). And gby for block-wise

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

No branches or pull requests

1 participant