Keyboard shortcut to comment lines in Sublime Text 3

后端 未结 26 2539
深忆病人
深忆病人 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条回答
  • 2020-12-02 04:50

    For Brazilian ABNT Keyboards you do Ctrl + ; to comment and repeat it to remove the comment.

    0 讨论(0)
  • 2020-12-02 04:53

    On MAC instead of shift use ALT like this CMD + ALT + /

    0 讨论(0)
  • 2020-12-02 04:53

    In case anyone has had further issues with Sublime 3 on Windows 7, the above suggestions all did not work for me. However, when I 1 - reran the app as administrator and 2 - highlighted, and chose Edit -> Comment -> toggle comment, afterwards I was able to use a user preferences set keybinding to toggle comments. I don't really have an explanation for why it worked, except that it did.

    0 讨论(0)
  • 2020-12-02 04:54

    I'm under Linux too. For me, it only works when I press CTRL+SHIFT+/, and it's like a single comment, not a block comment. The reason is to acceed the / character, I have to press SHIFT, if I do not, sublime text detects that I pressed CTRL + :.

    Here it is my solution to get back normal preferences. Write in Key Bindings - User :

    { "keys": ["ctrl+:"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+:"], "command": "toggle_comment", "args": { "block": true } }

    0 讨论(0)
  • 2020-12-02 04:54

    For me, on Mac OS Sierra :

    { "keys": ["super+forward_slash"], "command": "toggle_comment", "args": { "block": true } }, { "keys": ["super+alt+:"], "command": "toggle_comment", "args": { "block": false } },
    
    0 讨论(0)
  • 2020-12-02 04:54

    In Windows use ctrl + shift + : to comment for Python.

    0 讨论(0)
提交回复
热议问题