sublime配置python开发环境_设置 Sublime Text 的 Python 开发环境

配置文件

Sublime Text 的一个优点就是它的所有配置都是简单的基于 JSON 的配置文件。这使得你可以很容易的将配置转到另一个系统中。我也见过一些人使用 Dropbox 自动同步他们所有电脑上的配置。

Preferences.sublime-settings 配置了 Sublimede 的显示和行为.你可以在sublime 中通过 Preferences > Settings — User 打开并编辑此文件。我使用如下配置:

{

// Colors

"color_scheme": "Packages/Tomorrow Color Schemes/Tomorrow-Night.tmTheme",

"theme": "Soda Dark.sublime-theme",

// Font

"font_face": "Ubuntu Mono",

"font_size": 16.0,

"font_options": ["subpixel_antialias", "no_bold"],

"line_padding_bottom": 0,

"line_padding_top": 0,

// Cursor style - no blinking and slightly wider than default

"caret_style": "solid",

"wide_caret": true,

// Editor view look-and-feel

"draw_white_space": "all",

"fold_buttons": false,

"highlight_line": true,

"auto_complete": false,

"show_minimap": false,

// Editor behavior

"scroll_past_end": false,

"highlight_modified_tabs": true,

"find_selected_text": true,

// Word wrapping - follow PEP 8 recommendations

"rulers": [ 72, 79 ],

"word_wrap": true,

"wrap_width": 80,

// Whitespace - no tabs, trimming, end files with \n

"tab_size": 4,

"translate_tabs_to_spaces": true,

"trim_trailing_white_space_on_save": true,

"ensure_newline_at_eof_on_save": true,

// Sidebar - exclude distracting files and folders

"file_exclude_patterns":

[

".DS_Store",

"*.pid",

"*.pyc"

],

"folder_exclude_patterns":

[

".git",

"__pycache__",

"env",

"env3"

]

}

Pylinter.sublime-settings配置了pylinter 插件。我使用下面的配置让 Pyhton 在保存时自动规范,并对违反规范显示图标。

{

// Configure pylint's behavior

"pylint_rc": "/Users/daniel/dev/pylintrc",

// Show different icons for errors, warnings, etc.

"use_icons": true,

// Automatically run Pylinter when saving a Python document

"run_on_save": true,

// Don't hide pylint messages when moving the cursor

"message_stay": true

}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值