Search code examples
csssasssublimetext3comments

Sublime Text 3 "toggle block comment" no longer comments out entire CSS selector


I haven't used ST for some months and I am quite certain that it used to comment/uncomment the entire CSS selector when using ctrl+shift+/ ("toggle block comment") with the cursor inside said selector, but nothing actually selected.

Is anybody aware of what could have caused this behaviour to be replaced with simply adding /* */ around the cursor?

I've tried using SCSS mode(which is what I usually use) and vanilla CSS mode.

Thank you!


Solution

  • What I was actually looking for was Emmet's "toggle comment" command which, in the case of CSS, toggles commenting the entire selector. I believe it's with an update to the respective package that the behaviour changed and stopped hooking into ctrl+shift+/, but I could be wrong.

    I ended up adding a keyboard shortcut for said command in Preferences > Key Bindings, like so:

        {
            "keys": ["alt+/"],
            "command": "emmet_toggle_comment"
        },