Sublime Text Python开发推荐设置
Sublime Text Python开发推荐设置
仅供参考及保存本人设置
Setting User
{
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Celeste.sublime-color-scheme",
"draw_white_space": "selection",
"expand_tabs_on_save": true,
"word_wrap":"true",
"file_exclude_patterns":
[
"*.doc",
"*.docx",
"*.pdf",
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
"*.lib",
"*.so",
"*.dylib",
"*.ncb",
"*.sdf",
"*.suo",
"*.pdb",
"*.idb",
".DS_Store",
"*.class",
"*.psd",
"*.db",
"*.sublime-workspace"
],
"font_face":
[
"Fira Code",
"Consolas",
"Microsoft YaHei"
],
"font_options":
[
"gray_antialias",
"subpixel_antialias"
],
"font_size": 15,
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"line_numbers": true,
"line_padding_bottom": 3,
"line_padding_top": 3,
"material_theme_accent_scrollbars": true,
"material_theme_accent_sky": true,
"material_theme_arrow_folders": true,
"material_theme_big_fileicons": true,
"material_theme_bold_tab": true,
"material_theme_compact_sidebar": true,
"material_theme_contrast_mode": true,
"material_theme_tabs_autowidth": true,
"material_theme_tabs_separator": true,
"material_theme_titlebar": true,
"rulers":
[
80
],
"save_on_focus_lost": true,
"shift_tab_unindent": true,
"show_encoding": true,
"show_full_path": true,
"show_line_endings": true,
"tab_size": 4,
"theme": "Default.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
}
package

设置可根据个人需要修改,想知道具体内容可以在default里搜索查找
anaconda个人推荐设置
python开发核心插件为anaconda包,里面包括快速补全和pep8自动检测和修改,基本装了它就达到了ide环境的水准,却拥有文本编辑器的打开速度(我的电脑是瞬间打开),而ide基本上都要10s以上才能打开,而且用途少,sublimetext3配合插件却能够编写各种语言。
{
"python_interpreter": "D:/SoftWare/Python/python.exe",
"swallow_startup_errors": true,
"disable_anaconda_completion": false,
"suppress_word_completions": true,
"suppress_explicit_completions": true,
"complete_parameters": false,
"complete_all_parameters": false,
"anaconda_linting": false,
"auto_formatting":true
}
terminal
而运行python程序,我一般用power shell直接输入命令运行,推荐安装terminal插件,提供右键菜单直接在当前位置打开powershell

也可选择安装另外一个插件,名称忘掉了,装完插件之后修改一些参数和命令就可以在sumlimetext3上直接运行python程序,c++配合编译器也可以直接运行,我之前也有装,但是修改参数命令部分有点麻烦,而且最关键的是,如果你的输出很多,sumlimetext3会直接卡死,而powershell或者cmd不会,可能是缓存机制和插件与软件配合不善的问题,毕竟sumlimetext3本身只是文本编辑器,本来并不支持显示用户输出,是靠插件将标准输出打印到文本上供用户查看,这个过程的设计暂时不支持大批量数据,而且python毕竟也是脚本语言,有很多python插件和命令都可运行在shell中,所以推荐大家直接使用powershell,可配合terminal直接在当前位置打开,然后python xxx.py即可运行程序,很方便,且terminal不需自己去修改配置,安装即可使用。

再讲讲其他辅助插件:
AutoFIleName是帮助编辑器获取文件路径,可装可不装,在添加资源文件和路径时有帮助。
localization其实是安装中文自动添加的
emmet,htmlBeautify,jsformat是web插件
material theme是主题,可不装
side bar是侧边栏,推荐装(基本必装)
convertToUtf8 utf8解决某些乱码问题
colorpicker html,css选色时使用

本文介绍了Sublime Text Python开发的推荐设置,包括Setting User、必备的anaconda插件及其设置,以及如何通过terminal插件方便地运行Python程序。anaconda提供了IDE级别的功能,如快速补全和PEP8检查。此外,文章建议使用Power Shell运行程序,以避免Sublime Text在处理大量输出时可能出现的卡顿问题,并提到了其他辅助插件如AutoFileName、material theme等。

2179

被折叠的 条评论
为什么被折叠?



