Pycharm common shortcut keys and simple use method

Source: Internet
Author: User
PyCharm3.0 Default shortcut key (translated)

Pycharm Default Keymap

1, editor (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

#!/usr/bin/env python
#-*-Coding:utf-8-*-
"""
__title__ = ' $Package _name '
__author__ = ' $USER '
__mtime__ = ' $DATE '
# code is far away from bugs with the god animal protecting
I love animals. They Taste delicious.
┏┓┏┓
┏┛┻━━━┛┻┓
┃☃┃
┃┳┛┗┳┃
┃┻┃
┗━┓┏━┛
┃┗━━━┓
┃ God the Beast bless ┣┓
┃ is never bug-free. ┏┛
┗┓┓┏━┳┓┏┛
┃┫┫┃┫┫
┗┻┛┗┻┛
"""

Ten Python file default encoding

File encodings> IDE Encoding:utf-8; Project Encoding:utf-8;

11. Code Automatic Collation Setup


Here line breaks remove √, otherwise bar, and Baz will be separated in different lines, not good-looking.

Del Piero Blog

File-> Settings-> appearance

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.