Sublime Text 3 python configuration

Source: Internet
Author: User
Tags sublime text

Package Control Installation Method

1. Open the console by pressing CTRL + ' or View > Show console, then paste the appropriate Python installation code;

2.Sublime Text 3 Installation code and enter:

Import Urllib.request,os; PF = ' package control.sublime-package '; IPP = Sublime.installed_packages_path (); Urllib.request.install_opener (Urllib.request.build_opener (Urllib.request.ProxyHandler ())); Open (Os.path.join (IPP, PF), ' WB '). Write (Urllib.request.urlopen (' http://sublime.wbond.net/' + pf.replace (', '%20 ')) . Read ())

3. Restart Sublime Text 3;

4. If you see the package control item in Perferences->package settings, the installation succeeds.

To install a plugin using the package control method:
    1. Press Ctrl+shift+p to bring up the command panel
    2. Enter install to bring up the Install Package option and enter, then select the plug-in you want to install in the list. :

pylinter.sublime-settings Configuration of the Pylinter plugin. I use the following configuration to let Pyhton automatically spec when saved and display icons for violations of the specification.

1 {2     //Configure Pylint ' s behavior 3     "PYLINT_RC": "/users/daniel/dev/pylintrc", 4   5     //Show different I Cons for errors, warnings, etc. 6     "use_icons": true, 7   8     //automatically run Pylinter when saving a Python do Cument 9     "Run_on_save": true,10     //Don ' t hide pylint messages when moving     the Cursor12 "Message_ Stay ": True13}

Sublimecodeintel Plug-in

Smart Tips plugin, this plugin smart tips feature is very powerful, can customize the content Library of hints, my Python smart tips settings

1     "Python": {2         "python": "D:/python27/python.exe", 3         "pythonextrapaths": 4             [5                 "D:/python27", 6                  "D:/python27/dlls", 7                  "D:/python27/lib", 8                  "D:/PYTHON27/LIB/LIB-TK", 9                  "d:/python27/lib/ Site-packages "Ten             ]11         }

Python PEP8 Autoformat Plugin

This is used to press PEP8 to automatically format the code. Can be installed in the Package manager. Shortcut keys ctrl+shift+r automatically format python code

Common configuration

1 {2     "Auto_complete": false, 3     "Caret_style": "Solid", 4     "Ensure_newline_at_eof_on_save": True, 5     " Find_selected_text ": True, 6     " font_size ": 11.0, 7     " Highlight_modified_tabs ": true, 8     " Line_padding_ Bottom ": 0, 9     " Line_padding_top ": 0,10     " scroll_past_end ": false,11     " Show_minimap ": false,12"     tab_ Size ": 4,13     " translate_tabs_to_spaces ": true,14     " Trim_trailing_white_space_on_save ": true,15     " wide _caret ": true,16     " Word_wrap ": true,17}

F12 or Ctrl+b run the py file if it is F12 best to add raw_input after the py file () or CMD will flash over;

Sublime Text 3 python configuration

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.