Sublime text 2,如何给菜单项设置热键'View - Word Wrap Column - etc'?

Sublime text 2, how to set hotkey to menu items 'View - Word Wrap Column - etc'?

我在热键 Edit - Wrap - etc 菜单和 View - Word Wrap 开关上找到了解决方案。但不是 View - Word Wrap Column - etc 菜单项。也试过找插件,没有...

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 the Default/ package.

如果您使用 Ctrl` 打开控制台并输入

sublime.log_commands(True)

它将打印 every 的命令。单身的。事物。你。做。True 更改为 False 以将其关闭。

无论如何,对于View → Word Wrap Column → 80,例如,它打印

command: set_setting {"setting": "wrap_width", "value": 80}

要设置键盘快捷键,请打开您的 .sublime-keymap 文件并添加以下内容:

{ "keys": ["ctrl+alt+shift+8"], 
  "command": "set_setting", 
  "args": {"setting": "wrap_width", "value": 80} 
}

您当然可以将 keys 更改为任何您想要的。