Sublime Text 3 + python configuration, complete setup and common plug-in installation

Source: Internet
Author: User
Tags sublime text

Four years of time, has been using the EmEditor editor for Python development, before is to do the process-oriented, only need to be a separate PY file maintenance can be used, but also very handy, but recently in the development of object-oriented, different py files are interrelated more, Feel simple to use the EmEditor editor is really a bit inefficient (mainly for EmEditor plug-ins are not familiar with, and then one by one py file lookup).

I searched the web for some python-developed editors and Ides, with the use of pycharm and Eclipse, I installed pycharm and tried it, the overall feeling was too much memory, and the boot was slightly slower, There are times when there is a lag (which may be why my computer is not very well configured), so I finally chose sublime text as a Python-developed editor.

Installation and configuration process is not very complicated, but for people who have not been configured and directly on the Internet to find information, some of the information is not comprehensive enough, resulting in some bend, so I will be the installation and configuration process, I hope to help people in need.

The information I find on the Internet will be listed in the final "related material" and thank the original author very much.

1. Download

Download on official website HTTP://WWW.SUBLIMETEXT.COM/3

2. Installation and use under Windows 2.1. Installation1. Win7 64-bit system, you can download the Windows * bit to install. 2. When installing, be careful to select Add to Explorer context menuSo that sublime text can be added to the right button, and when you right-click the file, you can open it directly using sublime text. 2.2, install the plug-in2.2.1, package Control1. Sublime text can use the package Control to make it easier to browse, install, and uninstall plugins. 2. How do I install the package control? (I was in a big circle around here.) )
You can refer to the installation steps provided on the Package Control website (1) using [Ctrl + '] (or view > Show Console menu) to open the sublime text console and paste the following Python code into the console: [HTML]View PlainCopy
  1. Import Urllib.request,os,hashlib;h =' 7183a2d3e96f11eeadd761d777e62404 ' + ' e330c659d4bb41d3bdf022e94cab3cd0 ';pf =  ' package control.sublime-package ';  ipp = sublime.installed_packages_path ();  urllib.request.install_opener ( urllib.request.build_opener ( urllib.request.proxyhandler ())    by = urllib.request.urlopen (   ' http://packagecontrol.io/'  + pf.replace ('   ',  '%20 '). Read ();  dh = hashlib.sha256 (by). Hexdigest ();  Print (' error validating download  (got %s instead of %s), please  Try manual install '  %  (dh, h))  if dh != h else open ( Os.path.join ( IPP, PF),  ' WB '  ). Write (by)   
Note: The above code will change depending on the version, so it is best to take "1" to copy the code. (2) If not installed automatically, "1" also provides a manual (Manual) installation method, specific practices can go to the official website reference (3) If you see the package control in Perferences->package settings, Indicates that the installation was successful. 2.2.2, using the package control to view installed plugins

1. Press Ctrl+shift+p to bring up the command panel.

2. Enter install to bring up the Install Package option and enter.

3. Select the plugin to install in the list, or enter the plug-in name (for example, to install the Imesupport plugin, enter Imesupport, it will filter the results in real time), according to the filter results in the command panel, choose the plug-in to install.

2.2.3, Package control installs the path of the plug-in

If you want to see what plug-ins are already installed in Sublime Text 3, you can do so in the following ways.

1. Press Ctrl+shift+p to bring up the command panel

2. Enter "Package" in the drop-down list to find "package control:list packages", select and enter, all the plug-ins will be displayed.

2.2.4, PluginsIn Python development There are some very useful plug-ins, can be very good to improve the development efficiency, the following are some of the plugins I use? Package Control: Plug-ins for managing plugins, previously installed? Sublimecodeintel: Code hint plugin, can be based on Python, Java and other automatic code hint installation steps: Open package control[preferences>>package Control] Input Install select the associated install package input Sublimecodeintel, and then check that the installed plug-in is visible through "Preferences>>package Settings" after installation is complete. Here can be customized to set some shortcut keys and mouse events, I do not operate, I just select Preferences-->browser packages...--> in the menu to enter the relevant directory sublimecodeintel\. Codeintel found config and modified the Python path ( determine the. Codeintel directory according to Settings-default[HTML]View PlainCopy
  1. {
  2. "Python": {
  3. "Python": "C:/python27/python.exe",
  4. "Pythonextrapaths":
  5. [
  6. "C:/python27",
  7. "C:/python27/dlls",
  8. "C:/python27/lib",
  9. "C:/python27/lib/site-packages"
  10. ]
  11. },
  12. }
? Sidebarenhancements: Expands the number of menu options in the sidebar to increase your productivity. Options such as "New file" and "Duplicate" are too important for ST3, and I even think ST3 should have provided these features. And just by "Delete" this feature makes the plugin worth downloading. This feature will put you in the Recycle Bin when you delete the file. While this feature is useless at first glance, when you do not use this feature to completely delete a file, unless you use the version management software, you will be very difficult to recover this file. The installation steps are the same as the other plugins, and the final installation results are as follows:   ?Pylinter:python Basic theme, by selecting the installed plugin and the style after use as follows installed style ?Sublimetmpl: New file template plug-in, can support multiple languages such as Python, PHP, etc., the following code is my configuration information in the configuration file in the Settings-user set up their own information [HTML]View PlainCopy
  1. {
  2. "Disable_keymap_actions": false,//"all"; "Html,css"
  3. "Date_format": "%y-%m-%d%h:%m:%s",
  4. "attr": {
  5. "Author": "MX",
  6. "Email": "[email protected]",
  7. "Link": "http://www.xiangcloud.com.cn/"
  8. }
  9. }

I have also modified the Python create template command to add the following information in key Bindings-user, meaning that ctrl+alt+p can create a new Python template [HTML]View PlainCopy
    1. [
    2. {
    3. "caption": "Tmpl:create python", "command": "Sublime_tmpl",
    4. "Keys": ["Ctrl+alt+p"], "args": {"type": "Python"}
    5. },
    6. ]

The results are as follows: ?Terminal: Opens a command window for various command operations ?Autopep8:python Development Specification PEP8 ?Anaconda: Automatic matching keywords and other practical functions, effectively improve development efficiency ?SUBLIMEREPL: Directly run the current file, can be easily debugged, and terminal can be used in conjunction with the specific reference "4" for basic Python development I installed these plug-ins, also basic enough. If you have different needs can be downloaded to the official website, or in the end I collected some of the information I think is good to see if there is a suitable plugin. Related information: "1" Package Control:installationhttps://packagecontrol.io/installation "2" by Jinshi Open https://sublime.wbond.net/ Installation "3" for Sublime text 3 set Python's full-stack development environment http://python.jobbole.com/81312/"4" based on Sublime text build Python IDE/http/ Loosky.net/2967.html "5" Sublime Text 3 Configuration and use method https://www.zybuluo.com/king/note/47271 "6" Some available plug-ins are introduced https://github.com /jikeytang/sublime-text "7" Some available plug-ins introduction http://blog.jobbole.com/79326/"8" Some available plug-ins introduced http://www.open-open.com/news/view/ 26d731

Sublime Text 3 + python configuration, complete setup and common plug-in installation

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.