Skip to content

[feature] Support for pasting current line/selection as a comment above/below #255

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

Closed
AniAggarwal opened this issue Oct 7, 2022 · 3 comments
Labels
duplicate This issue or pull request already exists

Comments

@AniAggarwal
Copy link

I find myself often copy-pasting a line or selection and then commenting out the original so that I can make some changes but still preserve the original if I want to revert. I'd love if there was native support for this as I've tried to create a mapping but it's been quite janky.

Example usage:

pr|int("just some code here that I want to change but preserve")
foo(bar)

> gcp with cursor anywhere on first line

# print("just some code here that I want to change but preserve")
|print("just some code here that I want to change but preserve")
foo(bar)

Similar behavior with selections, with gcp pastes below and gcP pastes above and gbp and gbP doing the same but with block comments.

@numToStr
Copy link
Owner

numToStr commented Oct 8, 2022

Duplicate of #70. Please search issue tracker first for similar issues.

@numToStr numToStr added the duplicate This issue or pull request already exists label Oct 8, 2022
@numToStr numToStr closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2022
@AniAggarwal
Copy link
Author

Sorry, must have missed it! I can't quite get that one to work though (I'll comment on that thread).

@numToStr
Copy link
Owner

numToStr commented Oct 8, 2022

There is also a discussion thread about the same (or create one?). Please follow that instead of commenting on a different issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants