简体   繁体   中英

Setting Sublime Text 2 with Python?

I want to ask how you can set Sublime Text 2 for Python? Note, I'm a complete beginner, in Sublime Text 2 as well as Python, so I need a simple explanation of which packages to download (perhaps links) and then where to put the packages in order for it to work.

Thanks for your time!

Firstly when creating a new file, you need to click on View->Syntax and select Python so that the code is correctly highlighted etc. The next thing is to install package control. This allows you to install packages with ease. So download package control from this link

https://sublime.wbond.net/Package%20Control.sublime-package

Then go to sublime and click Preferences->Browse Packages, this will take you to the package folder. You need to go up one directory, to the Sublime Text directory and then open the Installed Packages directory. Drop the file you just downloaded into here. Then close and reopen sublime. You now have package control installed.

To install a package simply press CTRL+SHIFT+P and a dialog box should appear. type in install and you shoudl see Package Control: Install Package highlighted. Press the enter key to select this and then you can search for the package you want. One you have the package highlighted, press enter and the package will install.

Regarding the packages you should download to be honest it is different for everyone, depending on how you work and what you want. But follow the above so you are good to go when you know the packages you want. But have a look at the two links below for some ideas.

http://dbader.org/blog/setting-up-sublime-text-for-python-development

http://outofmemoryblog.blogspot.com.es/2012/08/python-development-with-sublime-text-2.html

Stick with it, I moved to Sublime about 3 months ago and have never looked back. Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM