You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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:
>
gcp
with cursor anywhere on first lineSimilar behavior with selections, with
gcp
pastes below andgcP
pastes above andgbp
andgbP
doing the same but with block comments.The text was updated successfully, but these errors were encountered: