Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
839 views
in Technique[技术] by (71.8m points)

sublimetext3 - Keyboard shortcut to comment lines in Sublime Text 3

In Sublime Text 2 it was possible to comment out a line or a block of lines with Ctrl+/ and Ctrl+Shift+/. According to the menu Edit > Comment these shortcuts should be valid, but in Sublime Text 3 (build 3047) they no longer seem to work. Does anybody know the right default keyboard shortcuts for Linux and MacOS? Or is it a bug?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems a bug: http://www.sublimetext.com/forum/viewtopic.php?f=3&t=11157&start=0

As a workaround, go to Preferences->Key Bindings - User and add these keybindings (if you're using Linux):

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

Update: This also works on Windows 8 (see @Sosi's comment)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...