Enable Dark Mode!
useful-pycharm-keyboard-shortcuts.jpg
By: Cybrosys Technologies

Useful Pycharm Keyboard Shortcuts

Technical Odoo 14

PyCharm is a widely used Integrated development environment(IDE) for Python programming language. Moreover, Pycharm provides a very useful working environment for Odoo development. On a different note a shortcut is a method of achieving something more quickly or more easily than if you use the usual methods. Furthermore, learning shortcuts in PyCharm will be very helpful to use it efficiently.
 In this blog we will discuss some of the useful shortcuts in PyCharm.

PyCharm keyboard shortcuts:

Keyboard shortcuts include hotkeys which helps you stay more productive .Most of its commands are related to editing, navigation, refactoring and other specific tasks. Here are certain PyCharm keyboard shortcuts
1. Double Shift- Search everywhere
By using double shift we can search anything anywhere such as classes, files, Symbols and actions, also we can open it and execute it.
useful-pycharm-keyboard-shortcuts-cybrosys
2. Ctrl + E- View recent files
Using Ctrl + E we can view the recent files and also we can filter the files that we made changes to.
useful-pycharm-keyboard-shortcuts-cybrosys
3. Ctrl + Shift + N- Can be used to Go to the file Directly
4. Ctrl + /- Used to Comment out a line or block of code
5. Ctrl +Shift + /- Used to Comment out a line or block of code
Both the shortcuts Ctrl + / and Ctrl +Shift + /  helps to comment or uncomment a line or a block of code.
6. Ctrl +Shift + F-  Used to search in the entire file
useful-pycharm-keyboard-shortcuts-cybrosys
This shortcut helps you search a certain file on your project, module or Directory 
7. Ctrl + F - Search in a specific file
Suppose if you want to search for data or content in a specific file, you can select the file  and open it then enter Ctrl + F to perform your search.
useful-pycharm-keyboard-shortcuts-cybrosys
8. Alt +Shift + C- View Recent Changes
If you want to view what are the recent changes done, you can use this shortcut
useful-pycharm-keyboard-shortcuts-cybrosys
9. Ctrl + D – Duplicate the selected block or line at caret
By using this shortcut you can duplicate a line or a block of code on your file.
useful-pycharm-keyboard-shortcuts-cybrosys
10. Ctrl + G – Navigate to a line with the specified number in the current file
Suppose if you want go to a specific line on your code. Press Ctrl + G and specify the line number then click on ‘OK’ option which will take you to it.
11. Ctrl + Z – Undo the operation done
12. Ctrl + Shift + Z– Redo the operation done.
13. Ctrl + W – Extend your Selection
Suppose you select a line of code but you want to extend the selection. Press Ctrl + W , which will extend your selection
14. Ctrl + A – Select all data or lines.
By using this shortcut you can select entire line of code from your file
15. Ctrl + Shift + J – Join lines of code
Select a line or block of the code from your file,  then press Ctrl + Shift + J  it will make the lines joined to be in one line
16. Ctrl +N- Jump to a class in the project with specified name.
You can jump to a class in the project having a specified name.
useful-pycharm-keyboard-shortcuts-cybrosys
17. Ctrl +S- Save all the files and settings
18. Ctrl +V- Paste from the clipboard
19. Ctrl +R- Call the Replace Text dialogue box
You can select a string or a word then press Ctrl + R. Now you can replace it from where you select or from the entire code
20. Ctrl +Y- Delete a word from caret location to the end of word
As we have understood about the certain PyCharm keyboard shortcuts let's now move on to understand about the various navigational keys options available.
Navigation Keys:
Navigation keys makes the movement of the pointer around the screen easier by cutting down your mouse usage. Moreover, it helps the programmer be more efficient to do certain tasks on the computer. In addition, knowing navigation shortcuts in PyCharm will be very helpful in using it with efficiency. Hee are certain navigation shortcuts used in PyCharm:
1. Ctrl + Page Down- Move down to the bottom of the page.
It will moves the pointer to bottom of the page
2. Ctrl + Page Up- Move to the top of the page.
It will move the pointer to top of the page
3. Ctrl + Down- Move line at caret down by one line. Preserving syntactical correctness
 By using this shortcut you can move down line by line in your code
4. Ctrl + Left- Move to previous word
This shortcut helps you to move to the previous words from the current location on your code
5. Ctrl + Right- Move to next word
This shortcut helps you to move to the next words from the current location on your code
6. Ctrl + Up- Scroll up
 By using this shortcut you can move up line by line from your code
7. Ctrl + Home- Move to the beginning of text
Suppose if you want to move to the very beginning of file, you can use this shortcut
8. Ctrl + End- Move to the end of text
Suppose if you want to move to end of you file, you can use this shortcut
9. Ctrl + Enter- Split line or open item
By using this shortcut you can split lines of code from your file. Moreover, it helps you to open an item from the Pycharm
10. Ctrl + Backspace- Delete to word start
This shortcut helps to delete words.
As we are clear on navigation shortcuts used in PyCharm let's now move on to running or debugging shortcuts available in PyCharm
Running/Debugging:
These Shortcuts help in the process of execution and debugging to run easier. Some useful Running/Debugging Shortcuts in PyCharm are listed below.
1. Shift + F10- Run
To run you program file on Pycharm you can use this shortcut
2. Shift + F9- Debug
To Perform debug operation on your code press Shift + F19.
3. Alt + 5- Activate debug window
If you want see the debug window press Alt + 5 
4. Alt + F8- Evaluate arbitrary expression
To evaluate the arbitrary expressions on your code you can use this shortcuts
5. Shift + Alt + F10- Choose and run a configuration file.
By clicking Shift + Alt+ F10 it will list the all existing configuration files. Moreover, you can choose the configuration file you want and run it.
6. F7- Step to the next line executed
Step to the next line to be executed during debugging.
7. F8- Step to the next line in this file
Step to the next line in this file during debugging.
8. F9- Resume program execution
This shortcut helps you to resume the program execution during debugging.
9. Shift + F2- Terminate a debugging session
To end the debugging you can press Shift + F2 .
10. Ctrl + Shift + F8- View  and manage breakpoints.
This shortcut helps to view and manage all the breakpoints
As we are clear on certain Running/Debugging Shortcuts in PyCharm let's now move on to certain tips and shortcuts used to run the PyCharm in the next section.

Tips and Shortcuts:
Here is a list of certain tips and shortcuts used to run the PyCharm:
1. Comparing two files
a). Select your file
useful-pycharm-keyboard-shortcuts-cybrosys
b) Then press Ctrl + D
c) Select a file to compare
useful-pycharm-keyboard-shortcuts-cybrosys
d) Then you will get the comparison between these two files
useful-pycharm-keyboard-shortcuts-cybrosys
2. Ctrl + Alt + O- Optimize imports
You can optimize the imports using Ctrl + Alt + O
3. Shift + F6- Rename variable
Rename the variables using  Shift + F6
useful-pycharm-keyboard-shortcuts-cybrosys
4. Ctrl + F12- Shows the file structure
Using the Ctrl + F12 the PyCharm will show the file structure.
useful-pycharm-keyboard-shortcuts-cybrosys
5. Ctrl + Click- To Shows the declaration
6. Alt + Ctrl + F4- To open image in external editor
7. Ctrl + R- Replace in a file
8. Shift + Tab – To open a Unindent tab
9. Column selection- Drag mouse pointer + Alt + Shift 
Column Selection by dragging your mouse pointer while keeping the Alt + Shift key pressed.
useful-pycharm-keyboard-shortcuts-cybrosys
10. Debugging
Debugging is a useful tool to solve the errors in your code. The debugging can be done by following the a certain steps which are described below:
a) Click on the left side of your code line. A red dot will appear
useful-pycharm-keyboard-shortcuts-cybrosys
b) Click on the debugger icon on the screen, execution will stop on the first red line. By clicking F8 you can execute line by line and skip to the next dot by clicking F9.
useful-pycharm-keyboard-shortcuts-cybrosys
11. Your own shortcuts
You can add your own shortcuts by using:
Ctrl + Alt + S? Keymap
useful-pycharm-keyboard-shortcuts-cybrosys
There are the certain tips and shortcuts used in the PyCharm operations, hope that this was helpful to you.


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment

 


whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message