- To comment out lines:
ctrl + /
- To auto PEP8 (code cleanup/format):
ctrl + alt + L
- To enable Crtl+Mouse Wheel text zoom: File > Settings > Editor > General > Mouse > Change Font size...
- To change max character line: File > Settings > Editor > Code Style > Right Margin (columns) 120 default
- To search PyCharm commands:
ctrl + shift + a
- To close file tabs:
ctrl + F4
- Expand/Contract Code Blocks for a single code block:
ctrl + +
andctrl + -
(courser within code block) - Expand/Contract Code Blocks for a all code block:
ctrl + shift + +
andctrl + shift + -
If project folder already exists: File > Open > Navigate to folder
Configure your python environment: File > Setting > Project > Project Interpreter > Gear on top right > Add >> Virtualenv Environment > 2 options here...
- Create a virtualenv (highly recommended, for pip version control) Either link to an existing virtualenv python.exe (this will be under ProjectNameVenv/Scripts/) or create a virtualenv directly within PyCharm (note that you have to open to inherit all global packages, make sure this is unchecked before creating the virtualenv)
- Link to global python interpreter (access to all global pip)
- To configure terminal start directory:
File > Settings > Tools > Terminal > Start directory
- To configure a custom terminal emulator (like gitbash) inside pycharm terminal tab:
File > Settings > Tools > Terminal > Shell path: "C:\Program Files\Git\bin\sh.exe" --login