首先打开Sublime Text 2。
顶部菜单栏上选择 Preferences 。
Preferences
而不是选择 Key Bindings -User 。
Key Bindings -User
而不是把这个代码,
[ { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": true } } ]
我用 的 按Ctrl 强> + 的 转移 强> + 的 C 强> ,你也有不同的捷径关键用途。
在我的笔记本电脑上使用西班牙语键盘,问题似乎是键绑定上的“/”,我将其更改为 CTRL + 转移 + C 现在它的工作原理。
{ "keys": ["ctrl+shift+c"], "command": "toggle_comment", "args": { "block": true } },
对于德国键盘使用 CTRL + 转移 + # 切换块注释和 CTRL + # 切换一行注释。
快捷方式 Preferences->Key Bindings - Default 被设置为 按Ctrl + 转移 + / 和 按Ctrl + / ,但要实际使用这些功能,请按上述键。
Preferences->Key Bindings - Default
按Ctrl + d 的 和 强> 按Ctrl + 转移 + d ....
[ { "keys": ["ctrl+d"], "command": "toggle_comment", "args": { "block": false } }, { "keys": ["ctrl+shift+d"], "command": "toggle_comment", "args": { "block": true } }, ]
看起来像某种键盘映射bug。我是葡萄牙语,所以我使用的是PT / PT键盘。 Sublime Text 3显然正在处理 / 如 〜 。
最大操作系统:如果要切换注释多个单独的行与块注释整个选择,您可以进行多行编辑, 转移 + CMD + 大号 , 然后 CMD + / 在那个序列中。
你需要用“7”替换“/”,它适用于非英语键盘布局。