更新时间:2022-12-27 16:39:51
你可以在Edit
→Line
→Reindent
中找到,但是默认情况下它没有快捷方式.您可以通过转到菜单Preferences
→ Keybindings
→ User
添加快捷方式,然后在那里添加:
You can find it in Edit
→ Line
→ Reindent
, but it does not have a shortcut by default.
You can add a shortcut by going to the menu Preferences
→ Keybindings
→ User
, then add there:
{ "keys": ["f12"], "command": "reindent", "args": {"single_line": false} }
(使用 F12 键实现该功能的示例)
(example of using the F12 key for that functionality)
配置文件使用 JSON 语法,因此这些大括号必须以逗号分隔放置在默认情况下的方括号中.如果您还没有任何其他键绑定,那么您的整个 Keybindings
→ User
文件当然看起来像这样:
The config files use JSON-syntax, so these curly braces have to be placed comma-separated in the square-brackets that are there by default. If you don't have any other key-bindings already, then your whole Keybindings
→ User
file would look like this, of course:
[
{ "keys": ["f12"], "command": "reindent", "args": {"single_line": false}}
]