sublime快捷键修改成vscode的
Windows/Linux:点击 Preferences > Key Bindings。
macOS:点击 Sublime Text > Preferences > Key Bindings。
[
// 编辑操作
{ "keys": ["ctrl+shift+k"], "command": "delete_line" },
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
{ "keys": ["ctrl+/"], "command": "toggle_comment" },
{ "keys": ["ctrl+shift+/"], "command": "toggle_comment", "args": {"block": true} },
// 查找与替换
{ "keys": ["ctrl+f"], "command": "show_panel", "args": {"panel": "find"} },
{ "keys": ["ctrl+h"], "command": "show_panel", "args": {"panel": "replace"} },
{ "keys": ["ctrl+g"], "command": "find_next" },
{ "keys": ["ctrl+shift+g"], "command": "find_prev" },
{ "keys": ["ctrl+shift+f"], "command": "show_panel", "args": {"panel": "find_in_files"} },
// 窗口与视图
{ "keys": ["ctrl+b"], "command": "toggle_side_bar" },
{ "keys": ["ctrl+1"], "command": "set_layout", "args": {"cols": [0.0, 0.5, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1]]} },
{ "keys": ["ctrl+2"], "command": "set_layout", "args": {"cols": [0.0, 0.5, 1.0], "rows": [0.0, 0.5, 1.0], "cells": [[0, 0, 1, 1], [0, 1, 1, 2], [1, 0, 2, 1], [1, 1, 2, 2]]} },
{ "keys": ["ctrl+3"], "command": "set_layout", "args": {"cols": [0.0, 0.33, 0.66, 1.0], "rows": [0.0, 1.0], "cells": [[0, 0, 1, 1], [1, 0, 2, 1], [2, 0, 3, 1]]} },
{ "keys": ["ctrl+shift+tab"], "command": "prev_view" },
{ "keys": ["ctrl+tab"], "command": "next_view" },
// 文件操作
{ "keys": ["ctrl+shift+s"], "command": "save_all" },
{ "keys": ["ctrl+shift+w"], "command": "close_window" },
{ "keys": ["ctrl+shift+n"], "command": "new_window" },
// 格式化代码(需要安装插件,如 Beautify 或其他格式化插件)
{ "keys": ["shift+alt+f"], "command": "beautify" },
// 其他
{ "keys": ["ctrl+shift+up"], "command": "swap_line_up" },
{ "keys": ["ctrl+shift+down"], "command": "swap_line_down" },
{ "keys": ["ctrl+shift+l"], "command": "split_selection_into_lines" },
{ "keys": ["ctrl+shift+u"], "command": "upper_case" },
{ "keys": ["ctrl+u"], "command": "lower_case" },
// 修改 Home 和 End 键的行为
{ "keys": ["home"], "command": "move_to", "args": {"to": "bol"} },
{ "keys": ["end"], "command": "move_to", "args": {"to": "eol"} },
{ "keys": ["ctrl+home"], "command": "move_to", "args": {"to": "bof"} },
{ "keys": ["ctrl+end"], "command": "move_to", "args": {"to": "eof"} }
]