可用 Sublime Text 3/EmEditor 快速打开各类文本大文件。
安装扩展:菜单 Preferences > Package Control
或 Ctrl+Shift+P
输入 Package Control: Install Package
(pcip
),搜索并安装。
扩展中心:Package Control:管理扩展。
设置代理:Preferences > Package Setting > Package Control
,设置 http_proxy
。
- 同步配置 Sync Settings,可同步 82dc267edba66801d198a828584819fb 配置;
- 格式化系列,建议安装 JSON、XML 格式化插件;
- SideBarEnhancements
快捷键 | 说明 | 按键有变更 |
---|---|---|
Alt+Z |
自动换行 | 自定义,Z ,折来折去,形象化 |
Ctrl+Shift+P |
命令面板 (几乎所有编辑器都参考了这个快捷键,包含浏览器) | |
Ctrl+P |
跳转到文件 (影响力同上) | |
Ctrl+D |
依次选中下一个相同的匹配项 (影响力同上) | |
Ctrl+Enter |
快速插入新行,在下方 (影响力同上) | |
Ctrl+Shift+Enter |
快速插入新行,在上方 (影响力同上) | |
Ctrl+L |
行选择 (向下) (Line) | |
Alt+L |
行选择 (向上) | |
Ctrl+K+F |
格式化代码 (Format) | 否,内置 (Selection > Format ),最早由 Visual Studio 引入 |
Ctrl+Shift+L |
列模式 (已选择行) | |
Ctrl+Shift+K |
删除行 | |
Ctrl+J |
合并选择内容 (Join) | 是,有语义助记 |
Alt+↑ |
移动 (上移) | 是,与 VS Code 保持一致 (不用考虑选中,支持光标位置) |
Alt+↓ |
移动 (下移) | 是,与 VS Code 保持一致 |
Alt+Shift+↑/↓ |
再制选择内容 | 是 |
Ctrl+Shift+↑/↓ |
将上方或下方的行添加到选择中 | 是 |
Ctrl+K+K |
书签创建/删除 (Bookmark) | 是,有语义助记 |
Ctrl+K+P |
书签跳转,上一个 (Bookmark Prev) | 是,有语义助记 |
Ctrl+K+N |
书签跳转,下一个 (Bookmark Next) | 是,有语义助记 |
Ctrl+K+C |
书签,清除 (Bookmark Clear) | 是,有语义助记 |
Ctrl+K+1 ... 9 |
折叠第 1, 2 ... 9 层级 | |
Ctrl+K+0 / Ctrl+K+J |
展开所有层级 | |
Ctrl+K+T |
折叠 HTML/XML 标签属性 | |
Ctrl+Shift+[ |
折叠 | |
Ctrl+Shift+] |
展开 | |
Alt+0 |
聚焦最后一个编辑器 | 是,与 VS Code 保持一致 |
Alt+1 ... 9 |
聚焦第 1, 2 ... 9 编辑器 | |
Ctrl+0 |
聚焦侧边栏 | |
Ctrl+1 ... 9 |
聚焦第 1, 2 ... 8 编辑器分组 | |
Alt+Shift+O |
向外扩展选择 (Outward) | 是,有语义助记 |
Alt+Shift+A |
向外自动扩展选择 (Automatic) | 是,有语义助记 |
Alt+Shift+( |
选择括号内部 | 是,有语义助记 |
Alt+Shift+T |
选择 HTML/XML 标签内部 (Tag) | 是,有语义助记 |
Ctrl+\ |
编辑器分组 (新建) | 是 |
Ctrl+Shift+\ |
编辑器分组 (撤销) | 是 |
Alt+Shift+PageUp |
‘编辑器’移动 (前一组) | 是 |
Alt+Shift+PageDown |
‘编辑器’移动 (后一组) | 是 |
配置入口:菜单 Preferences > Key Bindings
。
Preferences > Key Bindings
。[
// 转换变更命名风格
{
"keys": ["ctrl+u","ctrl+s"],
"command": "convert_ident_case",
"args": {
"case": "lower",
"separator": "_"
}
},
{
"keys": ["ctrl+u","ctrl+k"],
"command": "convert_ident_case",
"args": {
"case": "lower",
"separator": "-"
}
},
{
"keys": ["ctrl+u","ctrl+c"],
"command": "convert_ident_case",
"args": {
"case": "title",
"first_case": "lower"
}
},
{
"keys": ["ctrl+u","ctrl+p"],
"command": "convert_ident_case",
"args": {
"case": "title"
}
},
{
"keys": ["ctrl+u","ctrl+u"],
"command": "swap_case"
},
// 书签
{
"keys": ["ctrl+k","ctrl+n"],
"command": "next_bookmark"
},
{
"keys": ["ctrl+k","ctrl+p"],
"command": "prev_bookmark"
},
{
"keys": ["ctrl+k","ctrl+k"],
"command": "toggle_bookmark",
"args": {
"toggle_line": true
}
},
{
"keys": ["ctrl+k","ctrl+c"],
"command": "clear_bookmarks"
},
// 行操作
{
"keys": ["ctrl+j"],
"command": "join_lines"
},
{
"keys": ["alt+up"],
"command": "swap_line_up"
},
{
"keys": ["alt+down"],
"command": "swap_line_down"
},
{
"key": "alt+d",
"command": "duplicate_line"
},
{
"keys": ["alt+shift+up"],
"command": "duplicate_line"
},
{
"keys": ["alt+shift+down"],
"command": "duplicate_line"
},
// 插入光标
{
"keys": ["ctrl+shift+up"],
"command": "select_lines",
"args": {
"forward": false
}
},
{
"keys": ["ctrl+shift+down"],
"command": "select_lines",
"args": {
"forward": true
}
},
// 选择
{
"keys": ["alt+shift+o"],
"command": "expand_selection",
"args": {
"to": "scope"
}
},
{
"keys": ["alt+shift+a"],
"command": "expand_selection",
"args": {
"to": "smart"
}
},
{
"keys": ["alt+shift+9"],
"command": "expand_selection",
"args": {
"to": "brackets"
}
},
{
"keys": ["alt+shift+t"],
"command": "expand_selection",
"args": {
"to": "tag"
},
"context": [{"key": "selector","operator": "equal","operand": "(text.html, text.xml) - source","match_all": true}]
},
// 编辑器 (聚焦、分组、布局)
{
"keys": ["alt+9"],
"command": "select_by_index",
"args": {
"index": 8
}
},
{
"keys": ["alt+0"],
"command": "select_last_tab"
},
{
"keys": ["ctrl+\\"],
"command": "new_pane"
},
{
"keys": ["ctrl+shift+\\"],
"command": "close_pane"
},
{
"keys": ["alt+shift+pageup"],
"command": "move_to_neighboring_group",
"args": {
"forward": false
}
},
{
"keys": ["alt+shift+pagedown"],
"command": "move_to_neighboring_group"
},
// 侧边栏
{
"keys": ["ctrl+b"],
"command": "toggle_side_bar"
},
// 自动换行
{
"keys": ["alt+z"],
"command": "toggle_setting",
"args": {
"setting": "word_wrap"
}
}
]
配置入口:菜单 Preferences > Settings
。
Preferences > Settings
。{
// 显示折叠按钮
"fade_fold_buttons": false,
// 索引文件
"index_files": true,
// 显示空白符 (空格,制表符)
"draw_white_space": ["all","selection_none"],
// 显示 non-ascii 空白符 (zero-width space,non-breaking space)
"draw_unicode_white_space": "all",
// 自动移除行尾空白符
"trim_trailing_white_space_on_save": "all",
// 支持反向缩进
"shift_tab_unindent": true,
// 文件末尾自动添加换行符
"ensure_newline_at_eof_on_save": true,
// 高亮当前行
"highlight_line": true,
// 不显示左右滚动按钮
"hide_tab_scrolling_buttons": true,
// 不显示创建 Tab 按钮
"hide_new_tab_button": true,
// 显示文件相对路径
"show_rel_path": true,
// 光标样式
"caret_style": "solid",
"caret_extra_top": 0,
"caret_extra_bottom": 0,
"caret_extra_width": 1,
// 主题样式
"font_size": 11,
"color_scheme": "Mariana.sublime-color-scheme",
"theme": "Adaptive.sublime-theme",
"themed_title_bar": true,
}
- 开启命令记录,在 Console 中输入
sublime.log_commands(True)
; - Key Bindings