-
Notifications
You must be signed in to change notification settings - Fork 29.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
ctrl + / in html file displays {% comment %} ... {% endcomment %} #61348
Comments
It's the next day now, my computer was off all night, and I'm still seeing the incorrect behavior exhibited. |
@qdirks hi, out of curiosity, did you ever change your key bindings at some point? I can't reproduce this behaviour |
Not to my knowledge. Ctrl + / is the default binding for comment shortcut, right? That's what it is for me. It was working correctly for me just a moment ago, but I was able to trigger the bug just now. Can you please try to: or basically: That seemed to trigger it for me. I was thinking, maybe it happens if I try to comment something before vscode is done loading up completely; you might see if that can trigger it. Or I'll try to see if that is the cause the next time it starts working again. |
@qdirks I tried your steps and don't see the problem. This is my sample code: <html>
<script>
console.log("Hello")
</script>
</html> I set the cursor at the beginning of the 'console.log' line and press 'Ctrl + /'. |
@aeschli |
After vscode does those little updates, it starts working again. I also tested to see if it matters about vscode still loading up, and no it doesn't. The comment shortcut always fails after closing and reopening vscode for me, no matter how long you wait for vscode to be done loading, but -- so far as I'm aware -- it only happens in html files. After it has failed, it does not work again until something happens, like an update, or you uninstall it and reinstall it. Rebooting does nothing. |
Thanks for the video. The problem is that your editor language is 'Django Template' (as seen in the status bar). You have to file an issue against the extension that provides the Django Template language to configure embedded languages like HTML does. |
Okay. And when you uninstall and reinstall, it plainly says that extensions are not removed. I don't remember ever installing the django extension, but I can believe that I did at some point. Disabling that fixed the issue for me. Thanks so much. |
which django extension was it? We should file an issue against it. |
https://github.com/iambibhas/vscode-django-template or if you type in "django template" when searching the extension marketplace inside vscode. It's the one by bibhasdn, v.1.2.0 I would have filed an issue with it but I don't see how to do it. And I was looking at it... that actually might be intended for it to markup the comments that way. Look at this image: Very similar markup. This picture is on the extension page. Perhaps I was not cognizant of why I was installing the extension in the first place so long ago. |
@iambibhas Can you enable issues for https://github.com/iambibhas/vscode-django-template? To handle embedded languages, you need to declare the scope names of the embedded language as done here: https://github.com/Microsoft/vscode/blob/3dd2b19b2ab7303d76296267217798d417251804/extensions/html/package.json#L47 |
Issue Type: Bug
This comment was copied from issue #61030.
@aeschli
Yeah, it's happening again. I can believe that there are no changes in that area. This has been an issue for me in previous versions I think. Sometimes it works fine, and sometimes it doesn't.
I guess I'm leaving my computer (and vscode) on for several hours at a time without usage. Could that cause the bug to manifest?
I can confirm that closing and re-opening the program does not fix the problem. I will try a reboot really quick and see if the problem is gone.
The bug is still present after rebooting. As of right now, I'm not sure what I'm doing to cause the bug to manifest, or what causes the bug to disappear.
VS Code version: Code 1.28.2 (7f3ce96, 2018-10-17T00:23:51.859Z)
OS version: Windows_NT x64 10.0.17134
System Info
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Extensions (17)
The text was updated successfully, but these errors were encountered: