Keyboard shortcut to comment lines in Sublime Text 2 Ask Question

Keyboard shortcut to comment lines in Sublime Text 2 Ask Question

In Sublime Text 2, how do I enclose a selection in a comment?
Is there a keyboard shortcut for this action?

ベストアンサー1

By default on Linux/Windows for an English keyboard the shortcut is Ctrl+Shift+/ to toggle a block comment, and Ctrl+/ to toggle a line comment.

If you go into Preferences->Key Bindings - Default, you can find all the shortcuts, below are the lines for commenting.

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

おすすめ記事