Commenting one line selection with control k should comment in the style of /* */ #7707
Labels
documentation
Improvements or additions to documentation are required by this issue
feature request
New feature (or a request for one)
Is your feature request related to a problem?
Not a problem, but I do often skip doing in line comment to hold values or such other one word additions in comments because typing out the line comments is pretty slow and annoying
Describe the solution you'd like
I think the solution would be simple, if you've clicked a line it would do a normal control k with // and if you have multiple lines selected it would do multi line // comments as before but if your selection is just a partial section of one line (or maybe a multi line selection with alt to grab a column?) then it would instead comment out that selection with /* */
So, in a line like health = 25 * level; You could select the * level part and with control k make the line: health = 25/* * level*/;
I often do things like this even now to show potential additions to code or values that I don't have set up yet but would like to include in a line once they were. Of course it's not super important and can easily be replicated manually or with a normal // comment nearby to explain what you want to do but I personally like dropping single words into or out of my lines every once in a while.
I could see it becoming problematic when uncommenting lines because it wouldn't always be clear whether they wanted to uncomment a // or the /* / or it was just a multi line uncomment and the / */ wasn't supposed to be touched at all. You could leave these type of comments untouched unless the selection specifically includes that format as if you were trying to recomment a section that was previously commented in that same way. Basically if a one line or column selection included these type of comments it would remove them and I guess only one maximum per line selected?
That is all, I understand if it's not worth adding for whatever reason and you've probably considered it before I would think. Either way, thanks team!
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: