sublime text 2 build configuration

Sublime is a great editor, it can deal with nearly all programming languages and expecially fit for web developer.

I tried the sublime for Python. For beginner, you should do the following settings:

  • Install the package control
    • usage: ctrl+shift+p  -> install packages
  • configure the your build system:
    • For example python 3:
      Tools -> Build System -> New Build System -> (create file: python3)

      {
          "cmd": ["python3", "-u", "$file"],
          "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
          "selector": "source.python",
          "encoding": "utf8",
          "path": "/Library/Frameworks/Python.framework/Versions/3.3/bin/"
      }
      
      • The file is in : %AppData%\Roaming\Sublime Text 2\Packages\User
    • or just install the package: ctrl+shift+p -> install packages -> python 3 & cython+
    • The customed build system file is located in %AppData%\Roaming\Sublime Text 2\Packages\Python3.sublime-build
  • If you want to delete the file, you can directly delete it or install a package with: PackageResourceViewer

References:

https://packagecontrol.io/packages/Python%203

http://stackoverflow.com/questions/23161604/how-to-set-which-version-of-python-sublime-text-uses

http://stackoverflow.com/questions/27338255/sublime-text-3-removing-build-systems

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.