BYU logo Computer Science

PyCharm Hotkeys and Terminal Commands:

Hotkeys

Hotkeys (Pycharm): Mac: Windows:
Copy Command c Ctrl c
Cut Command x Ctrl x
Paste Command v Ctrl v
(#) Comment Out Command / Ctrl /
Select All Command a Ctrl a
Undo Command z Ctrl z
Reformatting Code Command option l Ctrl alt l
Move a Single Line command shift arrow key (up/down) alt shift arrow key (up/down)
Moving a Code Block option shift arrow (up/down) Ctrl shift arrow (up/down)
Delete Phrase command delete Ctrl delete
Select Certain Number of lines/files shift click/ arrows (you click twice - but it works for more than just code.) shift click/ shift arrows (you click twice - but it works for more than just code.)
Indent Select lines, tab Select lines, tab
Reverse Indent Select lines, shift+tab Select lines, shift+tab
Rename Ctrl+alt+shift+t+enter

Terminal

Commands: What it does:
python <filename> run a python file
cd <any folder after> change directories
cd .. Move up/backwards through a directory
ls list files in directory
'up arrow'/'down arrow' hit up arrow to go to previous commands
exit closes terminal
touch <new_filename> create a file
bash <filename> run a .sh file on Linux