Pycharm Quick Use

Source: Internet
Author: User
Tags python script


Directory (?) [-] pycharm learning tips Learning Tips PyCharm30 default shortcut translation pycharm Common settings pycharm environment and path configuration Python interpreter path Python project interpreter path Pycharm Python Package Management Python script interpretation path console execution path and current working directory Pycharm configuration Osenviron environment pycharm Configure Third-party Library code automatic hint pycharm practical extension function Pycharm to clear the compiled PYC intermediate file Pycharm set the external tool to change the above deletion code to an external tool, you can perform code quality directly in the following way Python2 Python3 the quickest way to other

http://blog.csdn.net/pipisorry/article/details/39909057

This blog has been updated in sync.

Content includes: Pycharm Learning tips Learning Tips, PyCharm3.0 default shortcut keys (translated), Pycharm common settings, pycharm environment and path configuration, Pycharm Practical expansion function: Pycharm cleared compiled. PYC intermediate file, Python2 Python3 fastest Way
[Pycharm version control and database management] [The practical features in Pycharm]
Pycharm Learning Skills Learning Tips

/pythoncharm/help/tip of the day:
A special variant of the Code completion feature invoked by pressing Ctrl+space twice allows your to complete the name of a NY class No matter if it is imported in the current file or. If The class is isn't imported yet, the import statement is generated automatically.
Can quickly find all places where a particular class, method or variable are used in the whole project by positioning T He caret at the symbol's name or at its usage in code and pressing ALT+SHIFT+F7 (find Usages in the popup menu).
To navigate to the Declaration of Class A, method or variable used somewhere in the code, position the caret at the usage and press F12. You can also click the mouse in usages with the Ctrl key pressed to jump to declarations.
You can easily rename your The local variables with automatic correction to all places where they are.
To try it, where the caret at the variable you want to rename, and press Shift+f6 (Refactor | Rename). Type the new name in the popup window that appears, or select one of the suggested names, and press Enter.

...

Switch
Use Alt+up and Alt+down keys to quickly move between methods in the editor.
Use Ctrl+shift+f7 (Edit | Find | Highlight Usages in file) to quickly highlight Usages of some, variable in the current file.
Choose
You can easily make column selection by dragging your mouse pointer while keeping the ALT key pressed.
Full complement
Working in the interactive consoles, you don ' t need to memorise the command line syntax or available. Instead, you can use the familiar code completion ctrl+space. Moreover, from within the lookup list, can be press Ctrl+q to view the item ' s documentation.
Show
Use F3 and shift+f3 the keys to navigate through highlighted usages.
Press Escape to remove highlighting.
History
Ctrl+shift+backspace (Navigate | Last Edit Location) brings the "back" to "the" where you are made changes in the code.
Pressing ctrl+shift+backspace a few times moves your deeper into your changes.
Ctrl+e (View | Recent files) brings a popup list of the recently visited files. Choose the desired file and press Enter to open it.
Use Alt+shift+c to quickly review your recent to the project.
Shearing Board
Use the Ctrl+shift+v shortcut to choose and Insert recent clipboard into the text.
If it selected in the editor, and your press CTRL + C, then the whole line at caret of is copied to the Clipboard.
Run/debug
By pressing ALT+SHIFT+F10 You can access the Run/debug dropdown on the main toolbar, without the need to use your mouse.

In the Pycharm installation directory/opt/pycharm-3.4.1/help directory can find referencecard.pdf shortcut key English version description or open Pycharm > Help > Default keymap ref

PyCharm3.0 Default shortcut key (translated)

Pycharm Default Keymap

1. Edit (Editing) Ctrl + Space Basic code completion (class, method, property)
Ctrl + Alt + Space quickly import any class
Ctrl + Shift + Enter statement complete
Ctrl + P parameter information (calling parameters in a method)

Ctrl + Q Quick View Document

F1 External Documents

Shift + F1 External document, go to Web document homepage

Ctrl + Shift + Z--> Redo redo
Ctrl + hover/Click left mouse button introduction/Enter code Definition
Ctrl + F1 Display error descriptions or warning messages
Alt + Insert automatically generate code
Ctrl + O Re-method
Ctrl + Alt + T Select
Ctrl +/Line comment/Cancel line comment
Ctrl + Shift +/Block Comment
Ctrl + W Select the added code block
Ctrl + Shift + W back to Previous state
Ctrl + Shift +/[SELECT code block end, start
Alt + Enter Quick fix
Ctrl + Alt + L code formatting
Ctrl + Alt + O optimize import
Ctrl + Alt + I Auto Indent
Tab/shift + Tab indent, no indent when forward
Ctrl+x/shift+delete cut the current line or the selected code block to the Clipboard
Ctrl+c/ctrl+insert Copy the current line or selected code block to the Clipboard
Ctrl+v/shift+insert Paste from clipboard
Ctrl + Shift + V paste from the nearest buffer
Ctrl + D Copy the selected range or row
Ctrl + Y to delete selected rows
Ctrl + Shift + J Add smart wire
Ctrl + Enter Smart wire cut
Shift + Enter Another line
Ctrl + Shift + U toggle between selected areas or blocks of code
Ctrl + DELETE to end of character
Ctrl + Backspace Delete to character start
Ctrl + numpad+/-Expand/collapse code block (current position: function, comment, etc.)
Ctrl + SHIFT + numpad+/-expand/Collapse All code blocks
Ctrl + F4 To turn off the running tabs
2. Find/replace (search/replace)
F3 Next
Shift + F3 Previous
Ctrl + R Replace
Ctrl + SHIFT + F or 2 consecutive clicks Shift Global Find {You can find a string or something in the entire project, such as looking for a function name string to see how to use this function before.}
Ctrl + Shift + R global substitution
3. Operation (Running)
Alt + Shift + F10 run mode configuration
Alt + Shift + F9 Debug mode configuration
Shift + F10 Run
Shift + F9 Debugging
Ctrl + Shift + F10 Run editor configuration
Ctrl + Alt + R run manage.py task
4, debugging (Debugging)
F8 Skip.
F7 into
Shift + F8 Exit
ALT + F9 Run cursor
Alt + F8 Validation expression
Ctrl + Alt + F8 Quick Validation expression
F9 Recovery Program
Ctrl + F8 Breakpoint switch
Ctrl + Shift + F8 View breakpoints
5, navigation (navigation)
Ctrl + N jump to Class
Ctrl + Shift + N jump to symbol

Alt + right/left jump to Next, previous edit tab (code file)

Alt + Up/down jump to Previous, next method F12 back to the previous tool window
Esc back to edit window from tool window
Shift + ESC To hide a running, recently running window
Ctrl + Shift + F4 to close the active run tab
Ctrl + G View current line number, word symbol
Ctrl + E Current file pops up, open list of recently used files
Ctrl+alt+left/right, move back.

Ctrl+shift+backspace Navigation to the most recent edit area {Almost is to return to the last edit location} Alt + F1 Find current file or identity
Ctrl+b/ctrl+click Jump to Declaration
Ctrl + Alt + B jump to implementation
Ctrl + Shift + I view quick definition
Ctrl + Shift + b jump to type declaration

Ctrl + U Jump to Parent method, parent class

CTRL +/[jump to code block end, start Ctrl + F12 Popup file structure
Ctrl + H Type hierarchy
Ctrl + Shift + H method hierarchy
Ctrl + Alt + H Call Hierarchy
F2/shift + F2 Next, previous highlight error
F4/ctrl + Enter edit resources, view resources
ALT + Home Display navigation bar F11 bookmark switch
Ctrl + Shift + F11 bookmark Mnemonic switch
Ctrl + #[0-9] jumps to the identified bookmark
Shift + F11 Show bookmark
6, search related (Usage)
Alt + F7/ctrl + F7 file query usage
Ctrl + Shift + F7 file usage highlighting
Ctrl + Alt + F7 display usage
7. Refactoring (Refactoring)
F5 copy F6 cut
ALT + DELETE Safe Delete
Shift + F6 Rename
Ctrl + F6 Change signature
Ctrl + Alt + N Inline
Ctrl + Alt + M extraction method
Ctrl + Alt + V Extract Properties
Ctrl + Alt + F extract Field
Ctrl + Alt + C Extract Constants
Ctrl + Alt + P extraction Parameters
8, control vcs/local History
Ctrl + K Submit Project
Ctrl + T Update project
Alt + Shift + C to see Recent changes
Alt + backquote (') VCs quick Popup
9. Template (Live Templates)
Ctrl + Alt + J Current line using template
Ctrl +j Insert Template
10, Basic (general)
ALT + #[0-9] Open the appropriate tool window
Ctrl + Alt + y sync
Ctrl + Shift + F12 maximize edit switch
Alt + Shift + F add to Favorite
Alt + Shift + I check the current file based on configuration
Ctrl + backquote (') Fast Toggle Current Schedule
Ctrl + Alt + S Open Settings page
Ctrl + Shift + A Find all the actions in the editor

Ctrl + TAB Toggles between Windows

[pycharm 2.7 shortcut keys]

Del Piero Blog


pycharm Common Settings

LZ hint, pycharm settings can be imported and exported, File>export settings can save the current pycharm set to jar file, reload can be directly import Settings>jar file, You don't have to repeat the configuration.

File-> Setting->editor

1. To set up the Python automatic introduction package, first in the >general > Autoimport-> python:show popup shortcut key: Alt + Enter: Automatically add a package

2. "Code automatic Completion" Time delay setting

> Code Completion-> Auto Code completion in (ms): 0-> Autopopup in (ms): 500

3. Pycharm the default is not to use CTRL + Wheel to change the size of the font, you can set in 〉mouse

4. Show "line number" and "White space character"

> Appearance-> tick "show line Numbers", "Show Whitespaces", "Show method Separators"

5. Set the color and font theme for the editor

> Colors & Fonts-> Scheme name-> select "Monokai" "Darcula"

Description: First select "Monokai", and then "Save as" as "Monokai-pipi", because the default theme is "read-only", some font size and color can not be modified, a copy of the rear can be modified.

Modify Font Size

> Colors & Fonts-> Font-> Size-> set to "14"

6. Set Indents to tab "tab"

File-> Default Settings-> Code Style

-> General-> Check "use tab character"

-> Python-> Check "use tab character"

-> other language codes with empathy set 7. Remove default collapse

> Code folding-> Collapse By default-> all remove tick
8. Pycharm By default is automatically saved, the habit of pressing CTRL + S can be set as follows:
> General-> Synchronization-> save files on frame deactivation and save files automatically if application is ID Le for.. The SEC's tick is removed

> Editor Tabs-> Mark modified Tabs with asterisk

9.>file and code Template>python scripts

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.