Keyboard shortcut to comment lines in Sublime Text 3

后端 未结 26 2575
深忆病人
深忆病人 2020-12-02 04:42

In Sublime Text 2 it was possible to comment out a line or a block of lines with Ctrl+/ and Ctrl+Shift+/. According t

26条回答
  •  Happy的楠姐
    2020-12-02 05:06

    This is a keyboard internationalisation issue.

    On a standard US QWERTY keyboard, as used in Australia where Sublime Text is made, / is readily available: US QWERTY keyboard

    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. German QWERTZ keyboard

    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.

提交回复
热议问题