安装Sublime Package Control
1、打开Preferences菜单,并选择 Browse Packages…
2、系统会打开Sublime Text 2的Packages文件夹,回到上一级菜单,然后打开Installed Packages文件夹;
3、下载并将下载的Package Control.sublime-package到 Installed Packages文件夹(注意此处是Installed Packages,不是Packages文件夹);
4、重启Sublime Text 3;
- 使用Ctrl+Shift+P打开命令行模式,在里面输入Install Package(或IP)即可搜索需要的Package。一般使用“ConvertToUTF8”和“GBK upport”即可正常读取中文字符;
配置Python3编译环境+Robot插件
- 点击Tools->Build System->new Build System
- 修改配置文件:
{
"cmd": ["C:/python37/python.exe", "-u", "$file"],
"file_regex": "^[ ]File "(...?)", line ([0-9]*)",
"selector": "source.python"
}
保存文件并重命名为python37.sublime-build,重启sublime;
安装效率插件
安装Boxy Theme主题,并配置ST3全局(Preferences-Package Settings-Boxy Theme-Preferences-User Setting):
{
"auto_find_in_selection": true,
"bold_folder_labels": true,
"font_face": "Monaco",
"font_size": 13,
"theme": "Boxy Solarized Dark.sublime-theme",
"color_scheme": "Packages/Boxy Theme/schemes/Boxy Solarized Dark.tmTheme",
"default_line_ending": "unix",
"dpi_scale": 1.0,
"draw_minimap_border": true,
"ensure_newline_at_eof_on_save": true,
"fade_fold_buttons": false,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"save_on_focus_lost": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
"update_check": false,
"word_wrap": "true"
}-
RobotFrameworkAssistant,用于Robot语法高亮
{
"cmd": ["C:/Python37/Scripts", "-d", "C:/Python37/robot_log", "$file"],
"selector": "source.robot",
"variants": [{ "name": "Selects the test cases by tag", "cmd": ["python", "-m", "robot.run", "--include", "REPLACE_WITH_TAG", "$file"], }, { "name": "Selects the test cases by name", "cmd": ["python", "-m", "robot.run", "--test", "REPLACE_WITH_TEST_NAME", "$file"] }
]
} Python PEP8 Autoformat ,代码格式更正,快捷键:Ctrl+Shift+R
Terminal,打开cmd命令窗口,快捷键:Ctrl+Shift+T,配置如下:
{
"terminal": "c:\WINDOWS\system32\cmd.exe",
"parameters": ["/START","%CWD%"]
}Anaconda,Python终极插件,配置如下:
{
//忽略各种空格不对, 超过80字, import的函数没有使用的提醒,
"pep8_ignore": ["E501", "W292", "E303", "W391", "E225", "E302", "W293", "E402"],
"pyflakes_explicit_ignore":
[
"UnusedImport"
],
//保存文件后自动pep8格式化
"auto_formatting": true,
//库函数的提示
"enable_signatures_tooltip": true,
"merge_signatures_and_doc":true,
"anaconda_linting": false,
}SideBarEnhancements,扩展侧边,不需要配置,但值得注意的是ST3打开(项目)文件夹后才有用;
Pylinter,Python语法检查,前提: pip install pylint
{
//Python路径
"python_path": [
"C:/Users/HuangPiHu/AppData/Local/Programs/Python/Python36/python.exe"
],
//安装pylint-1.7.2的绝对路径
"pylint_path": "C:/python37/Lib/site-packages/pylint/lint.py",
//忽略“R”、“C”提示
"ignore": ["R","C"],
}