BYU logo Computer Science

PyCharm Hotkeys and Terminal Commands:

Hotkeys

Hotkeys (Pycharm):Mac:Windows:
Copy, Cut PasteCommand cCtrl c
CutCommand xCtrl x
PasteCommand vCtrl v
(#) Comment OutCommand /Ctrl /
Select AllCommand aCtrl a
UndoCommand zCtrl z
Reformatting CodeCommand option lCtrl alt l
Move a Single Linecommand shift arrow key (up/down)alt shift arrow key (up/down)
Moving a Code Blockoption shift arrow (up/down)Ctrl shift arrow (up/down)
Delete Phrasecommand deleteCtrl delete
Select Certain Number of lines/filesshift 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.)
IndentSelect lines, tabSelect lines, tab
Reverse IndentSelect lines, shift+tabSelect lines, shift+tab
RenameCtrl+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
lslist files in directory
'up arrow'/'down arrow'hit up arrow to go to previous commands
exitcloses terminal
touch <new_filename>create a file
bash <filename>run a .sh file on Linux