In Sublime Text 2 it was possible to comment out a line or a block of lines with Ctrl+/ and Ctrl+Shift+/. According t
i am ubuntu 18 with sublime text 3.2
CTR + /
On a standard US QWERTY keyboard, as used in Australia where Sublime Text is made, / is readily available:
This is not the case with many other keyboards. Take for example the German QWERTZ keyboard. One needs to hit SHIFT+7 to get a /. This is why commenting does not work properly on these keyboards.
Changing the user keybindings to those listed below, will work for the German QWERTZ keyboard.
{ "keys": ["ctrl+7"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+7"], "command": "toggle_comment", "args": { "block": true } }
If the problems are occurring with still a different keyboard layout, change the keybindings accordingly.
U can fix this bug by:
[
{ "keys": ["ctrl+keypad_divide"], "command": "toggle_comment", "args": { "block": false } },
{ "keys": ["ctrl+shift+keypad_divide"], "command": "toggle_comment", "args": { "block": true } },
]
it allow to comment with CTRL+/ and CTRL+SHIFT+/ and u can use / on keypad =)
Had the same issue. Check with sublime.log_input(True) command on the console to see what keys are being detected with the CTRL+/ and SHIFT+CTRL+/ shorcuts. Then replace the shortcuts with those. (Changing / for keypad_divide worked for me)
On windows, use Ctrl + Shift + ?. You will be able to comment the HTML.
I prefer pressing Ctrl + /
to (un)comment the current line. Plus, I want the cursor to move down one line, thus this way I can (un)comment several lines easily. If you install the "Chain of Command" plugin, you can combine these two operations:
[
{
"keys": ["ctrl+keypad_divide"],
"command": "chain",
"args": {
"commands": [
["toggle_comment", { "block": false }],
["move", {"by": "lines", "forward": true}]
]
}
}
]