-
Notifications
You must be signed in to change notification settings - Fork 30.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
Commenting problem #108702
Comments
@IMPrimph exactly same case here. In fact sometimes while writing CSS code under the style tag in an HTML code when I select some part of the CSS code and press ctrl+/ to comment it uses HTML comment(i.e. ) instead of CSS comment(/* /). I have to manually type / */ to get my job done. I don't know if it's a fault in the settings of in the VS code. |
@hDmtP |
Can you add small code sample with steps that show what's not working? |
@aeschli
Then I wrote some more code:
And now, when I tried to select all(Ctrl + A) and comment at once(Ctrl + /), the code is not getting commented:
|
@IMPrimph That's how the commenting feature works. It just adds comment tokens (e.g. @hDmtP That's an unrelated issue, but I'm not able to reproduce what you are seeing. I get the proper CSS comments |
@aeschli Yes the language mode is HTML and it reproduces with extensions disabled. |
@aeschli |
@gjsjohnmurray |
@IMPrimph As seen in the screen shot, all the comment action does is adding the comment tokens (`/*` `*/`). The commented content is intentionally not modified, e.g. no closing comment token ( `*/`) is escaped. that's left to the user. That's how the comment command is intended to work. |
@gjsjohnmurray I don't see how this is related to #107989. |
Not only you @gjsjohnmurray I have also seen this feature working in other's VS code. But hell knows why negative in case of mine. |
@hDmtP Can you highlight the same text, open the command palette, select "Developer: Inspect Editor Tokens and Scopes" and post a screenshot? |
This issue has diverted into various topics. I believe the original issue was based on a misunderstanding. I'll close this and would be happy if new issues with code sample and reproducible steps are filed. |
We have written the needed data into your clipboard because
Issue Type: Bug
In any CSS file, if I wrote some code and comment on it for the first time, it works fine.
But, when I write some more code and select all the parts (previously commented part "using Ctrl + A")and comment again, it's not working.
VS Code version: Code 1.50.1 (d2e414d, 2020-10-13T15:06:15.712Z)
OS version: Windows_NT x64 10.0.18363
System Info
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Extensions (10)
(1 theme extensions excluded)
The text was updated successfully, but these errors were encountered: