(If the following method tries the Packages control function , it is not possible to refer to this method:
1. Directly delete the original Packages control folder under the C:\Sublime Text 3x64\data\packages\ directory.
2. Manually download the Packages control plugin:https://packagecontrol.io/Package%20Control.sublime-package
3. Take the downloaded plugin to the C:\Sublime Text 3x64\data\installed Packages directory to reopen the Sublime so
4. There are also: some people ask why Ctrl+b compiled the code after the console does not display the results: The first time ctrl+b choose Python do not choose to check the syntax just fine
)
(The source of the following method: Http://www.cnblogs.com/waising/articles/3466120.html)
You can configure the Python environment by referring to the following methods:
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:
- Press Ctrl+shift+p to bring up the command panel
- 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 icons for errors, warnings, etc.
6 "use_icons": true,
7
8 // Automatically run Pylinter when saving a Python document
9 "run_on_save": true,
10
11 // Don‘t hide pylint messages when moving the cursor
12 "message_stay": true
13 }
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"
10 ]
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 and package control configuration methods