-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Add "ac" ("a comment") text object #1779
Conversation
To select a comment block. Fixes #1508 Requires fatih/motion#4
@@ -1085,6 +1085,9 @@ if "inside a function", select contents of a function, | |||
excluding the function definition and the closing bracket. This | |||
text-object also supports literal functions | |||
|
|||
*go-v_ac* *go-ac* | |||
ac "a comment", select contents of the current comment block. | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there way we could support ic
as well? This could be handy if we want to remove the comment with leaving it intact. For example // this is a comment
could be deleted via dic
, so it would end up with //
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that would be useful, it is a little bit tricky to get it to behave intuitively in cases with multi-line comments, but I think I got it right.
Just tried it out and seems like
|
The following fixes it:
I'll merge this PR and apply the fix above. |
To select a comment block. Fixes #1508
Requires fatih/motion#4