Fundamentals 23 min read

Master PyCharm: Essential Shortcuts, Settings, and Git Integration Tips

This guide compiles the most useful PyCharm shortcuts, configuration tweaks, version‑control setup, and database management tips, helping developers work faster, keep their code organized, and seamlessly integrate Git within the IDE.

MaGe Linux Operations
MaGe Linux Operations
MaGe Linux Operations
Master PyCharm: Essential Shortcuts, Settings, and Git Integration Tips

PyCharm Default Keymap (Translated)

Editing

Ctrl+Space – basic code completion (classes, methods, fields) Ctrl+Alt+Space – smart import Ctrl+Shift+Enter – complete statement Ctrl+P – parameter info Ctrl+Q – quick documentation Shift+F1 – external documentation Ctrl+Shift+Z – redo Ctrl+Mouse – quick definition Ctrl+F1 – show error description Alt+Insert – generate code Ctrl+O – override method Ctrl+Alt+T – surround with… Ctrl+/ – line comment Ctrl+Shift+/ – block comment Ctrl+W – extend selection Ctrl+Shift+W – shrink selection Alt+Enter – intention actions Ctrl+Alt+L – reformat code Ctrl+Alt+O – optimize imports Ctrl+Alt+I – auto‑indent Tab / Shift+Tab – indent / unindent Ctrl+X / Shift+Delete – cut line or block Ctrl+C / Ctrl+Insert – copy line or block Ctrl+V / Shift+Insert – paste Ctrl+Shift+V – paste from recent buffers Ctrl+D – duplicate line/selection Ctrl+Y – delete line Ctrl+Shift+J – join lines Ctrl+Enter – smart line split Shift+Enter – start new line Ctrl+Shift+U – toggle case Ctrl+Delete – delete to word end Ctrl+Backspace – delete to word start Ctrl+Numpad+/- – collapse/expand code block Ctrl+Shift+Numpad+/- – collapse/expand all blocks Ctrl+F4 – close tab

Search/Replace

F3 – next Shift+F3 – previous Ctrl+R – replace Ctrl+Shift+F – find in path Ctrl+Shift+R – replace in path

Running

Alt+Shift+F10 – select run configuration Alt+Shift+F9 – select debug configuration Shift+F10 – run Shift+F9 – debug Ctrl+Shift+F10 – run editor configuration Ctrl+Alt+R – run manage.py task

Debugging

F8 – step over F7 – step into Shift+F8 – step out Alt+F9 – run to cursor Alt+F8 – evaluate expression Ctrl+Alt+F8 – quick evaluate F9 – resume Ctrl+F8 – toggle breakpoint Ctrl+Shift+F8 – view breakpoints

Navigation

Ctrl+N – go to class Ctrl+Shift+N – go to file Alt+Right/Left – next/previous tab F12 – focus tool window Esc – focus editor Shift+Esc – hide tool window Ctrl+Shift+F4 – close active tab Ctrl+G – go to line/column Ctrl+E – recent files Ctrl+Alt+Left/Right – back/forward Ctrl+Shift+Backspace – navigate to recent edit location Alt+F1 – select current file in project view Ctrl+B / Ctrl+Click – go to declaration Ctrl+Alt+B – go to implementation Ctrl+Shift+I – quick definition Ctrl+Shift+B – go to type declaration Ctrl+U – go to super method/class Alt+Up/Down – move to previous/next method Ctrl+]/[ – go to code block end/start Ctrl+F12 – file structure Ctrl+H – type hierarchy Ctrl+Shift+H – method hierarchy Ctrl+Alt+H – call hierarchy F2 / Shift+F2 – next/previous highlighted error F4 / Ctrl+Enter – edit/view resource Alt+Home – show navigation bar Ctrl+Shift+F11 – toggle bookmark Ctrl+#[0‑9] – jump to bookmark Shift+F11 – show bookmarks

Usage Search

Alt+F7 / Ctrl+F7 – find usages Ctrl+Shift+F7 – highlight usages Ctrl+Alt+F7 – show usages

Refactoring

F5 – copy F6 – move Alt+Delete – safe delete Shift+F6 – rename Ctrl+F6 – change signature Ctrl+Alt+N – inline Ctrl+Alt+M – extract method Ctrl+Alt+V – extract variable Ctrl+Alt+F – extract field Ctrl+Alt+C – extract constant Ctrl+Alt+P – extract parameter

VCS / Local History

Ctrl+K – commit Ctrl+T – update project Alt+Shift+C – show recent changes Alt+BackQuote – VCS quick popup

Live Templates

Ctrl+Alt+J – apply template on current line Ctrl+J – insert template

General

Alt+#[0‑9] – open tool window Ctrl+Alt+Y – synchronize Ctrl+Shift+F12 – maximize editor Alt+Shift+F – add to favorites Alt+Shift+I – inspect current file Ctrl+BackQuote – switch run configuration Ctrl+Alt+S – open settings Ctrl+Shift+A – find all actions Ctrl+Tab – switch between windows

Common PyCharm Settings

File → Settings → Editor → General → Auto‑import → enable “Show popup” for Python auto‑import (Alt+Enter adds missing imports).

Code Completion → Auto code completion in (ms): 0, Autopopup in (ms): 500.

Mouse → enable Ctrl+Mouse wheel to change font size.

Appearance → show line numbers, whitespaces, method separators.

Colors & Fonts → Scheme → select “Monokai” (or “Darcula”), then Save As a new scheme to edit colors.

Colors & Fonts → Font → Size → set to 14.

Code Style → General → use tab character for indentation (also enable for Python).

Code Folding → disable “Collapse by default”.

General → Synchronization → uncheck “Save files on frame deactivation” and “Save files automatically if idle”.

Editor Tabs → mark modified tabs with asterisk.

File → Settings → Build, Execution, Deployment → Console → PyConsole → set working directory for the Python console.

File → Settings → Project → Project Interpreter → set default script template (example shown with shebang and metadata).

File → Settings → Appearance → change IDE keymap (e.g., Eclipse) and customize shortcuts such as Alt+/ for code completion.

Version Control Integration (Git)

Enable VCS: Settings → Version Control → Git → set path to git executable.

To add a file to version control: select the file in the Changes tool window and press Ctrl+Alt+A (or right‑click → Git → Add).

Commit changes: press Ctrl+K , enter a commit message, and click Commit (or Commit and Push).

Push to remote: use the VCS → Git → Push dialog, select the branch, and provide GitHub credentials.

Update project (pull): press Ctrl+T , click the toolbar button, or choose VCS → Update Project.

Ignore files: Settings → Version Control → Ignored Files (e.g., workspace.xml is ignored by default).

View changes in editor: modified lines are highlighted in the gutter; clicking shows a popup with actions to navigate, view diff, revert, or copy to clipboard.

Simple Database Management

PyCharm can connect to databases via the Database tool window; configure data sources and run queries directly from the IDE.

Learning Tips

Press Ctrl+Space twice for class name completion with automatic import. Use Alt+Shift+F7 to find usages of a symbol. Press F12 to navigate to a declaration, or Ctrl+Click. Rename symbols with Shift+F6 and refactor safely.

sys
# print("Python %s on %s" % (sys.version, sys.platform))
sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
os
(, os.getcwd() )
numpy np
scipy sp
matplotlib
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

PyCharmIDE shortcutsGit integrationPython development
MaGe Linux Operations
Written by

MaGe Linux Operations

Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.