个人Sublime使用记录
侧边显示文件结构
- View-Side Bar-Show Side Bar
- File-Open Folder
- 导入了文件夹才会有文件夹的显示
安装Package Control
python环境配置
- 安装SublimeRePL
- Preferences-Package Control
- 键入install packages
- 稍等片刻,键入SublimeRePL
- 等待安装即可
- 键位绑定
- Preferences-Key Bindings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18{
"keys": ["f1"],
"caption": "SublimeREPL: Python",
"command": "run_existing_window_command", "args":
{
"id": "repl_python",
"file": "config/Python/Main.sublime-menu"
}
},
{
"keys": ["shift+enter"],
"caption": "SublimeREPL: Python - RUN current file",
"command": "run_existing_window_command", "args":
{
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
}
- Preferences-Key Bindings
markdown支持
- 安装SublimeRePL
- Preferences-Package Control
- 键入install packages
- 稍等片刻,键入Markdown Preview
- 等待安装即可
- 键位绑定
- Preferences-Key Bindings
1
2
3
4
5
6
7
8{
"keys": ["f2"],
"command": "markdown_preview", "args":
{
"target": "browser",
"parser":"markdown"
}
}
- Preferences-Key Bindings
OneNote更友好的代码显示
方法很多,详见知乎
个人觉得最好的方法Sublime+SublimeHighlight
- 安装Sublime,好用的编辑器,不多说了
- 安装Package Control
- 安装SublimeHighlight
- Preferences-Package Control
- 键入Add Repository,用来添加插件安装源
- 地址栏输入
https://github.com/n1k0/SublimeHighlight/tree/python3
- Preferences-Package Control
- 键入install packages
- 稍等片刻,键入SublimeHighlight
- 等待安装即可
配置
- Preference-Package Setting-Sublime Highlight-User Setting
1
2
3
4
5
6{
"theme": "monokai",
"linenos": "inline", # 显示行号,不想显示设为false
"noclasses": true,
"fontface": "Menlo"
}
- Preference-Package Setting-Sublime Highlight-User Setting
选中代码,右键
Copy as HTML
- OneNote中新建1x1表格,复制进去即可
- 最后也可以修改表格底色
Python的Tab键换成四个空格
- Preferences-setting
- 添加
"translate_tabs_to_spaces": true
Python代码自动补全
连接远程服务器
字体设置
1 | "font_face": "Microsoft YaHei Mono", |
Microsoft YaHei Mono
中文默认使用微软雅黑,英文默认使用Consolas,舒服line_padding_bottom
和line_padding_top
设置行间距,可解决中英文没对齐问题