本文介绍了Python 2.7和Sublime Text 2安装指南的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是Sublime Text 2的新手。基本上我想将Sublime T2设置为Python IDE。

I am new to Sublime Text 2. Basically I want to setup Sublime T2 as a Python IDE.

我遇到过关于Python和Sublime的各种问题T2,但我从初学者的角度找不到指导。这是我迄今为止所做的:

I have come across various questions with regards to Python and Sublime T2, but I couldn't find a guide from a beginners perspective. This is what I have done so far:


  1. 安装的Python。

  2. 已安装升级T2。 / li>
  3. 安装的升级软件包控制

应该遵循什么步骤(例如软件包安装等)完成升级Python IDE设置?

What steps (e.g. package installations, etc.) should I follow to complete the Sublime Python IDE Setup?

推荐答案

除了Package Control,我还使用以下软件包进行Python开发:

Besides Package Control, I use the following packages for Python development:







  • SideBarEnhancements
  • All Autocomplete
  • SublimeCodeIntel
  • GitGutter
  • Pylinter

我发现> SublimeCodeIntel 和 Pylinter 特别有助于在Sublime Text中编写Python代码。

I found SublimeCodeIntel and Pylinter to be especially helpful for writing Python code in Sublime Text.

除了安装这些软件包,您还应该调整一些Sublime的首选项。例如,Python可以非常挑剔空白。因此,我建议您特别小心设置Sublime如何处理空格。我正在使用这些设置(将它们放在首选项 - >设置 - 用户中):

Besides installing these packages you should also tweak some of Sublime's preferences. For example, Python can be quite picky about whitespace. Therefore I recommend taking extra care for setting up how Sublime handles whitespace. I'm using these settings (put them in Preferences -> Settings - User):

"tab_size": 4,
"translate_tabs_to_spaces": true,
"trim_trailing_white_space_on_save": true,
"ensure_newline_at_eof_on_save": true,

如果您想了解更多,我已经写了一篇有关为开发Python开发Sublime Text的博文:

If you want to know more, I've written a blog post about setting up Sublime Text for Python development: https://dbader.org/blog/setting-up-sublime-text-for-python-development

这篇关于Python 2.7和Sublime Text 2安装指南的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-13 11:02