你提到的 IDE 编辑器,不同编辑器(如 VS Code、WebStorm、IntelliJ IDEA、Eclipse、Sublime 等)绑定快捷键的方式不太一样。下面我按常见 IDE分别说明,你可以对照使用。
Ctrl + Shift + P(Windows/Linux)Cmd + Shift + P(macOS)Preferences: Open Keyboard Shortcutsformat、run)Ctrl + Shift + P → 输入 Open Keyboard Shortcuts (JSON){
"key": "ctrl+alt+f",
"command": "editor.action.formatDocument",
"when": "editorTextFocus"
}
File → Settings(macOS:IntelliJ IDEA → Preferences)KeymapReformat Code)Add Keyboard ShortcutCtrl + Alt + LShift + F10Window → PreferencesGeneral → KeysBinding → 输入快捷键ApplyPreferences → Key Bindings[
{
"keys": ["ctrl+alt+f"],
"command": "reindent"
}
]
Ctrl + Alt + 字母)如果你能告诉我:
我可以直接给你可复制的配置代码。
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。