📜 ⬆️ ⬇️

Some hot keys in PyCharm

I want to share with you the hot keys that I use or are trying to get used to in my daily work. In modern environments, their number can simply go off-scale, but the gradual addition of new combinations to the piggy bank can significantly increase your productivity. The above combinations apply to editing, navigation, refactoring and are valid only for the Default for XWin (Linux) layout.


Ctrl + Alt + Left / Ctrl + Alt + Right
On one of the leading positions (in my rating) is moving back and forth. If someone used emacs, then the functionality reminds marks and mark ring. With certain commands to move around the file, new positions are added to the history, and this is the place to move.


Ctrl + Shift + Backspace
Move to the last edit. In principle, this is a special case of the previous team, but nevertheless useful.


Ctrl + B
Many known move to the implementation.


Shift double click
Search by index, which includes file names, class names, their atrubits, etc. There are also separate commands:
Ctrl + N for classes, Ctrl + Shift + N for files and Ctrl + Alt + Shift + N for characters (functions, class attributes).


Ctrl + Shit + [0-9]
Named labels for quick navigation in "hot" places. Move to the label - Ctrl + [0-9] .
Deleting a label - pressing Ctrl + Shift + [0-9] again.


It looks like this

Ctrl + W
Code highlighting with syntax. Very useful feature.


It looks like this

Alt + Shift + Down / Alt + Shift + Up
Move the line where the cursor is positioned up or down. There is a similar command, but only for the whole
statements - Ctrl + Shift + Down / Ctrl + Shift + Down .


Ctrl + Y
Delete the entire line. By the way, the copy command Ctrl + C without selection also works for the entire line.


Ctrl + D
Duplicate the current line.


Ctrl + Alt + V
The selection of the selected expression in the variable. Works great in combination with Ctrl + W. There is also a reverse command for inserting the expression inline - Ctrl + Alt + N.


It looks like this

Ctrl + Shift + Delete
Make internal statements from the external block (if, for, try). Pay attention to what happens with the except or else blocks. There is also a reverse command for wrapping the code in a block - Ctrl + Alt + T.


Looks like that

Alt + Enter
When the cursor is pointed at a regular expression, the context menu is called, in which there is an option to check the expression for various input data. Relatively recently, I found out about this opportunity - nice thing.


It looks like this

In addition, I want to advise a wonderful tool in the Productivity Guide, which counts the number of times you have used a particular feature (those that are not used there are also listed). This is located in the Help-> Productivity Guide .


That's all. Leave in the comments hotkeys that you use. Productive coding!


')

Source: https://habr.com/ru/post/306838/


All Articles