Sublime Text 3 Installing the Python plugin

Source: Internet
Author: User
Tags function definition sublime text

1. Sublimecodeintel Plug-in

Function: Code completion, variables, function jumps

This plug-in contains code hints, completion plug-ins (can jump to variables, function definition where), according to Python, Java and other automatic code hints, can implement the syntax auto-completion function

2. AUTOPEP8 Plug-in

Function: PEP8 Check and format

1. In the file where the code is written, the right mouse button-->autopep8-->format

2.preferences->package Settings->autopep8-->settings-user Enter the following content:

{

Automatically formatted when saved

"Format_on_save": true,

Only ignore the limit of 80 characters per line

"Ignore": "E501"

}

3. SUBLIMEREPL Plug-in

Role: Breakpoint Debugging

Debug mode (two kinds of choice is possible):

1. tools-->sublimerepl-->python-->python-pdb current file, displays the PDB debug interface, can be debugged using the PDB command

2. Preferneces-->key bingdings, on the right side of the popup window (User), enter the following: (set shortcut keys, F5 run, ctrl+f5 Debug)

[

{"Keys": ["F5"], "caption": "Sublimerepl:python-run Current File", "command": "Run_existing_window_command", "args": {" ID ":" repl_python_run "," File ":" Config/python/main.sublime-menu "}},

{"Keys": ["Ctrl+f5"], "caption": "sublimerepl:python-pdb Current File", "command": "Run_existing_window_command", "Arg" S ": {" id ":" repl_python_pdb "," File ":" Config/python/main.sublime-menu "}}

]

Debug command:

H (ELP) prints the commands available for the current version of the PDB, and if you want to query a command, you can enter H [command], for example: "H L"-View the List command

L (IST) to list the blocks of code that are currently going to be run

B (reak) set breakpoints, such as "B 77″, is the current script in the 77 lines of the breakpoint, you can also enter the function name as a parameter, the breakpoint will hit the specific function entrance, if only knock B, will show all the existing breakpoints

CL (EAR) If a parameter is followed, clears the specified breakpoint, or clears all breakpoints if no argument is taken.

Disable/enable Disabling/activating breakpoints

N (EXT) lets the program run the next line, if the current statement has a function call, n is not entered in the called function body

S (TEP) is similar to n, but if there is currently a function call, then s will enter the body of the called function

C (ont (inue)) allows the program to run correctly until a breakpoint is encountered

J (UMP) lets the program jump to the specified number of rows

A (RGS) prints the parameters of the current function

P One of the most useful commands to print a variable

! After the exclamation point followed by the statement, you can directly change a variable

Q (uit) exit debug

W can display some of the most recent stack frame information

D can switch between stack frames to get information about its related context variables (query down)

You can toggle between stack frames to get information about their related context variables (query up)

4. Sublimetmpl Plug-in

Role: New file template supports multiple languages

Create a template by specifying a shortcut key

Ctrl+alt+h html

Ctrl+alt+j JavaScript

Ctrl+alt+j CSS

Ctrl+alt+p PHP

Ctrl+alt+r Ruby

Ctrl+alt++shift+p python

5. Sublimelinter Plug-in

Role: Check Python code specification

1. In the cmd or PowerShell command window, perform pip install PEP8 pyflakes

2. Switch to Sublime Text software,

3. Install the SUBLIMELINTER-PEP8, Sublimelinter-pyflakes plug-in

4.preferences->package settings->sublimelinter->settings

5. On the right side of the popup window (User), enter the following:

{

"Pep8": {

Whether to show Pep8 check (true to show, false not shown)

"@disable": true,

"args": [],

"Excludes": [],

"Ignore": "",

Limit the length of each row to 120

"Max-line-length": 120,

"Select": ""

}

}

Related plugins:

SUBLIMELINTER-PEP8 Plug-in

Sublimelinter-pyflakes Plug-in

Sublimelinter Jshint Plug-in

Sublimelinter Eslint Plug-in

Sublimelinter-cppcheck Plug-in

Sublimelinter-cpplint Plug-in

6. Pydoc Plug-in

Role: Viewing python documents

7. Python PEP8 Autoformat Plugin

Function: Automatically format Python code using the PEP8 specification (shortcut key Ctrl+shift+r)

8. Anaconda Plug-in

Function: Automatic matching of keywords and other functions, effectively improve development efficiency

9. Pylinter Plug-in

function: Check with Python syntax

CTags Plug-in

Function: Fast Tracking code (function tracking jump)

One. Sublimepythonide plug-in

Role: Python Debugging

Sublime Text 3 Installing the Python plugin

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.