Python 2.7 and Sublime Text 2 Setup Guide

前端 未结 3 1771
旧时难觅i
旧时难觅i 2021-02-04 18:21

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

I have come across various questions with regards to Python and Sublime T2, but I could

3条回答
  •  [愿得一人]
    2021-02-04 19:00

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

    • SideBarEnhancements
    • All Autocomplete
    • SublimeCodeIntel
    • GitGutter
    • Pylinter

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

    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,
    

    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

提交回复
热议问题