Sublime Text 3中注释行的键盘快捷键 [英] Keyboard shortcut to comment lines in Sublime Text 3

查看:202
本文介绍了Sublime Text 3中注释行的键盘快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Sublime Text 2中,可以使用 Ctrl + / Ctrl + Shift + /.根据菜单Edit > Comment,这些快捷方式应该有效,但是在Sublime Text 3(内部版本3047)中,它们似乎不再起作用.有人知道Linux和MacOS正确的默认键盘快捷键吗?还是一个错误?

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?

推荐答案

似乎是一个错误:作为一种解决方法,请转到Preferences-> Key Bindings - User并添加以下键绑定(如果使用的是Linux):

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 } }

更新:这也适用于Windows 8(请参阅@Sosi的评论)

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

这篇关于Sublime Text 3中注释行的键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆