Home>

hot key

1. Editing

ctrl + space basic code completion (class, method, property)

ctrl + alt + space to quickly import any class

ctrl + shift + enter statement completion

ctrl + p parameter information (calling parameters in a method)

ctrl + q Quickly view documents

shift + f1 external document

ctrl + mouse

ctrl + f1 display error description or warning message

alt + insert automatically generate code

ctrl + o restart method

ctrl + alt + t selected

ctrl +/line comment

ctrl + shift +/block comment

ctrl + w select the added code block

ctrl + shift + w return to the previous state

ctrl + shift +]/[end and start of selected code block

alt + enter for quick fixes

ctrl + alt + l code formatting

ctrl + alt + o optimize import

ctrl + alt + i auto-indent

tab/shift + tab indent, not indent the current line

ctrl + x/shift + delete Cut the current line or 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 nearest buffer

ctrl + d copy selected area or line

ctrl + y delete the selected line

ctrl + shift + j add smart line

ctrl + enter Smart Wire Cutting

shift + enter start another line

ctrl + shift + u to switch between selected regions or code blocks

ctrl + delete delete to the end of the character

ctrl + backspace delete to the beginning of the character

ctrl + numpad +/- expand and collapse code blocks

ctrl + numpad + expand all

ctrl + numpad- collapse all

ctrl + f4 close the running tab

2.Search/replace

f3 next

shift + f3 previous

ctrl + r replace

ctrl + shift + f global search

ctrl + shift + r global replacement

3.running

alt + shift + f10 operating 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

f8 skip

f7 enter

shift + f8 exit

alt + f9 run cursor

alt + f8 validation expression

ctrl + alt + f8 fast validation expression

f9 recovery procedure

ctrl + f8 breakpoint switch

ctrl + shift + f8

5.Navigation

ctrl + n jump to class

ctrl + shift + n jump to symbol

alt + right/left jump to the next, previous edited tab

f12 Go back to previous tool window

esc return to the editing window from the tool window

shift + esc hide the most recently run window

ctrl + shift + f4 close active tab

ctrl + g view the current line number, character number

ctrl + e pop up the current file

ctrl + alt + left/right back, forward

ctrl + shift + backspace navigate to the most recently edited area

alt + f1 find the current file or logo

ctrl + b/ctrl + click jump to declaration

ctrl + alt + b jump to implementation

ctrl + shift + i for quick definition

ctrl + shift + b jump to type declaration

ctrl + u jump to parent method, parent class

alt + up/down go to previous and next method

ctrl +]/[Jump to the end and start of the code block

ctrl + f12 pop up file structure

ctrl + h type hierarchy

ctrl + shift + h method hierarchy

ctrl + alt + h call hierarchy

f2/shift + f2 next, previous highlighted error

f4/ctrl + enter to edit resources, view resources

alt + home display navigation bar f11 bookmark switch

ctrl + shift + f11 bookmark mnemonic switch

ctrl + #[0-9] Jump to identified bookmark

shift + f11 show bookmarks

6, search related (usage search)

alt + f7/ctrl + f7 file query usage

ctrl + shift + f7 highlight usage in file

ctrl + alt + f7 show usage

7.Refactoring

f5 copy f6 cut

alt + delete

shift + f6 rename

ctrl + f6 change signature

ctrl + alt + n inline

ctrl + alt + m extraction method

ctrl + alt + v extract attributes

ctrl + alt + f

ctrl + alt + c extract constant

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 pop up quickly

9. Templates (live templates)

ctrl + alt + j

ctrl + J insert template

10.General

alt + #[0-9] Open the corresponding tool window

ctrl + alt + y

ctrl + shift + f12 maximize editing switch

alt + shift + f add to favorites

alt + shift + i check current file according to configuration

ctrl + backquote (") quickly switch the current plan

ctrl + alt + s Open the settings page

ctrl + shift + a find all actions in the editor

ctrl + tab to switch between windows

Some common settings:

1. pycharm is automatically saved by default,If you are used to pressing ctrl + s, you can make the following settings:

(1). Remove the tick of file->setting->general->synchronization->save files on frame deactivation and save files automatically if application is idle for .. sec

(2). File->setting->editor->editor tabs->mark modified tabs with asterisk tick

2.alt + enter:add packages automatically

3. For commonly used shortcut keys,Can be set to the same as visual studio (eclipse ...):

file->setting->keymap->keymaps->vuisual studio->apply

4. By default in pycharm, you cannot use ctrl + wheel to change the font size.Can be set in file->setting->editor->mouse

5. To set the font of pycharm, first select a style in file->setting->editor->editor, and save it,Before you can change

6. Searching theme in setting can change the theme,All color combinations change uniformly

7. Configure the import path of the python library:

For libraries we imported via sys.path.insert (...),pycharm is naturally unrecognizable,The editor will prompt an error.

unresolved reference "scriptfan" less… (ctrl + f1) this inspection detects names that should resolve but don "t. due to dynamic dispatch and duck typing, this is possible in a limited but useful number of cases. top-level and class- level items are supported better than instance items.

Solve such problems,This can be solved by changing the configuration items of the project.

Open file->settings->project settings->python intercepter->python intercepters Add a custom import path to the list in the paths tab.

After applying the configuration,This eliminates unresolved reference errors.

  • Previous Analysis of time display example of SMS list in Android programming
  • Next Explain the concepts of methods and properties in Swift programming