最近开始学习Django框架,一直用ST3来编辑但没有好好配置它,所以很是丑陋又不方便,于是就花了大半天查教程,基本算配置完了,记录以下配置的过程:
下载安装ST3
安装package.control插件,用来后面在线查找和下载插件(具体安装网上一搜都是)
参考此网址的教程ST配置教程来初步下载插件。
使用快捷键ctrl+shift+p打开搜索框,输入package
选择install package就可搜索插件并下载选择教程中的插件安装,我安装了如下插件:各插件具体是有和作用可以readme
配置setting-user
打开preferences->setting-user,输入用户的自定义配置,我参考上面两个教程后的配置如下:
{
"always_show_minimap_viewport": true,
"auto_complete_delay": 500,
"bold_folder_labels": true,
"color_scheme": "Packages/User/SublimeLinter/Monokai (SL).tmTheme",
"detect_indentation": false,
"detect_slow_plugins": false,
"draw_minimap_border": true,
"enable_telemetry": false,
"ensure_newline_at_eof_on_save": true,
"file_exclude_patterns":
[
".*",
"*.pyc",
"*.pyo",
"*.exe",
"*.dll",
"*.obj",
"*.o",
"*.a",
"*.lib",
"*.so",
"*.dylib",
"*.ncb",
"*.sdf",
"*.suo",
"*.pdb",
"*.idb",
".DS_Store",
"*.class",
"*.psd",
"*.db"
],
"folder_exclude_patterns":
[
".svn",
".git",
".hg",
"CVS",
"__pycache__"
],
"font_size": 12,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
],
"indent_guide_options":
[
"draw_active",
"draw_normal"
],
"indent_to_bracket": true,
"preview_on_click": false,
"rulers":
[
79
],
"shift_tab_unindent": true,
"show_panel_on_build": false,
"soda_classic_tabs": true,
"soda_folder_icons": false,
"theme": "SoDaReloaded Dark.sublime-theme",
"translate_tabs_to_spaces": true,
"trim_automatic_white_space": true,
"trim_trailing_white_space_on_save": true,
"wrap_width": 80
}
最后设置编译环境,找了好多教程,最后看到stackflow的一个问题后,新建了一个build system:
{
"cmd": ["start", "cmd", "/k", "c:/python27/python.exe", "$file"],
"selector": "source.python",
"shell": true,
"working_dir": "$file_dir"
}
changing the path to your Python executable as appropriate. Then, go to Tools -> Build System and create Python_cmd, and when you hit CtrlB to build, a new cmd window will open up with your file running. The /k option returns to the command prompt, without closing the window, after your program is done running so you can examine output, tracebacks, etc.
终于基本配置完了ST3,虽然其中配置过程很多不理解的地方,有待以后慢慢理解,附最后完成的效果: