根據網上的博客,總結在sublime text下開發python最需要的配置。
1、tab和空格的配置
Preference->Setting-User:
{
"draw_white_space": "all",
// The number of spaces a tab is considered equal to
"tab_size": 4,
// Set to true to insert spaces when tab is pressed
"translate_tabs_to_spaces": false,
//若要在保存時自動把tab 轉換成空格,請把下面一行設置成 true,如不需要: 設置成 false
"expand_tabs_on_save": false,
"font_size": 11.0,
"ignored_packages":
[
"Vintage"
]
}
2、安裝Python PEP8 Autoformat
Package Control->Install Package->Python PEP8 Autoformat
說明:PEP8是python的代碼規範,寫完代碼後格式化代碼
3、安裝Anaconda
該插件可以進行語法定義跳轉,語法補全,語法pep8自動檢查和改正。
官網:http://damnwidget.github.io/anaconda/
參考:
http://blog.csdn.net/aerchi/article/details/50395288