[英]Sublime text 2, how to set hotkey to menu items 'View - Word Wrap Column - etc'?
I've found solutions on hotkeys Edit - Wrap - etc
menu, and View - Word Wrap
toggle.我在热键Edit - Wrap - etc
菜单和View - Word Wrap
切换上找到了解决方案。 But not View - Word Wrap Column - etc
menu items.但不是View - Word Wrap Column - etc
菜单项。 Also tried to find plugins, nothing...也试过找插件,什么都没有...
https://www.sublimetext.com/docs/3/key_bindings.html https://www.sublimetext.com/docs/3/key_bindings.html
Currently there is no compiled list of all built-in commands.目前没有所有内置命令的编译列表。 The names of many commands can be found by looking at the
Default ({PLATFORM_NAME}).sublime-keymap
files in theDefault/
package.许多命令的名称可以通过查看Default/
package 中的Default ({PLATFORM_NAME}).sublime-keymap
文件找到。
If you open the console with Ctrl ` and enter如果您使用Ctrl `打开控制台并输入
sublime.log_commands(True)
it will print the command for every.它将为每个打印命令。 single.单身的。 thing.事物。 you.你。 do.做。 Change the True
to False
to turn it off.将True
更改为False
以将其关闭。
At any rate, for View → Word Wrap Column → 80
, for example, it prints无论如何,例如,对于View → Word Wrap Column → 80
,它会打印
command: set_setting {"setting": "wrap_width", "value": 80}
To set the keyboard shortcut, open your .sublime-keymap
file and add the following:要设置键盘快捷键,请打开您的.sublime-keymap
文件并添加以下内容:
{ "keys": ["ctrl+alt+shift+8"],
"command": "set_setting",
"args": {"setting": "wrap_width", "value": 80}
}
You can of course change the keys
to whatever you want.您当然可以将keys
更改为您想要的任何内容。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.