← All Shortcuts
DataGrip Keyboard Shortcuts
Complete DataGrip keyboard shortcuts and commands reference — 208 shortcuts across 16 categories. Quick reference cheat sheet for Windows & Mac.
DataGrip is JetBrains' database IDE, and while it uses the family keymap for navigation and editing, the keys that matter here are the SQL ones: execute a statement, execute a script, edit data in the grid, refresh. The table is the Windows/Linux keymap; the same features are on Cmd in the database tools built into IntelliJ, PyCharm and the others.
Query console (3)
Shortcut Action What it does
F4 Open a query console for the selected data source Select the data source in the Database Explorer first; the console is already connected, so you can type and run SQL right away.
Ctrl + Enter Execute the statement under the caret or the selection If the console holds several statements DataGrip shows a chooser; the list always includes an option to run all of them.
Ctrl + Shift + Q Open a new query console Faster than the toolbar button; each console keeps its own session.
Basic editing (23)
Shortcut Action What it does
Ctrl + X Cut Cut.
Ctrl + C Copy Copy.
Ctrl + V Paste Paste.
Ctrl + Alt + Shift + V Paste as Plain Text Paste as Plain Text.
Ctrl + Shift + V Paste from History Paste from History.
Ctrl + Shift + C Copy Paths Copy Paths.
Ctrl + Alt + Shift + C Copy Reference Copy Reference.
Ctrl + S Save All Save All.
Ctrl + Z Undo Undo.
Ctrl + Shift + Z Redo Redo.
Tab Indent Selection Indent Selection.
Shift + Tab Unindent Line or Selection Unindent Line or Selection.
Ctrl + Alt + I Auto-Indent Lines Auto-Indent Lines.
Shift + Enter Start New Line Start New Line.
Ctrl + Alt + Enter Start New Line Before Current Start New Line Before Current.
Ctrl + Y Delete Line Delete Line.
Ctrl + Shift + J Join Lines Join Lines.
Ctrl + D Duplicate Line or Selection Duplicate Line or Selection.
Ctrl + Shift + U Toggle Case Toggle Case.
Ctrl + Alt + Shift + Insert Scratch File Scratch File.
Shift + F4 Open Source in New Window Open Source in New Window.
Alt + Shift + . Increase Font Size in All Editors Increase Font Size in All Editors.
Alt + Shift + Comma Decrease Font Size in All Editors Decrease Font Size in All Editors.
Caret navigation (15)
Shortcut Action What it does
Ctrl + Left Move Caret to Previous Word Move Caret to Previous Word.
Ctrl + Right Move Caret to Next Word Move Caret to Next Word.
Home Move Caret to Line Start Move Caret to Line Start.
End Move Caret to Line End Move Caret to Line End.
Ctrl + Shift + M Move Caret to Matching Brace Move Caret to Matching Brace.
Ctrl + [ Move Caret to Code Block Start Move Caret to Code Block Start.
Ctrl + ] Move Caret to Code Block End Move Caret to Code Block End.
Alt + Down Next Method Next Method.
Alt + Up Previous Method Previous Method.
Ctrl + Page Up Move Caret to Page Top Move Caret to Page Top.
Ctrl + Page Down Move Caret to Page Bottom Move Caret to Page Bottom.
Page Up Page Up Page Up.
Page Down Page Down Page Down.
Ctrl + Home Move Caret to Text Start Move Caret to Text Start.
Ctrl + End Move Caret to Text End Move Caret to Text End.
Select text (19)
Shortcut Action What it does
Ctrl + A Select All Select All.
Shift + Left Left with Selection Left with Selection.
Shift + Right Right with Selection Right with Selection.
Ctrl + Shift + Left Move Caret to Previous Word with Selection Move Caret to Previous Word with Selection.
Ctrl + Shift + Right Move Caret to Next Word with Selection Move Caret to Next Word with Selection.
Shift + Home Move Caret to Line Start with Selection Move Caret to Line Start with Selection.
Shift + End Move Caret to Line End with Selection Move Caret to Line End with Selection.
Shift + Up Up with Selection Up with Selection.
Shift + Down Down with Selection Down with Selection.
Ctrl + Shift + [ Move Caret to Code Block Start with Selection Move Caret to Code Block Start with Selection.
Ctrl + Shift + ] Move Caret to Code Block End with Selection Move Caret to Code Block End with Selection.
Ctrl + Shift + Page Up Move Caret to Page Top with Selection Move Caret to Page Top with Selection.
Ctrl + Shift + Page Down Move Caret to Page Bottom with Selection Move Caret to Page Bottom with Selection.
Shift + Page Up Page Up with Selection Page Up with Selection.
Shift + Page Down Page Down with Selection Page Down with Selection.
Ctrl + Shift + Home Move Caret to Text Start with Selection Move Caret to Text Start with Selection.
Ctrl + Shift + End Move Caret to Text End with Selection Move Caret to Text End with Selection.
Ctrl + W Extend Selection Extend Selection.
Ctrl + Shift + W Shrink Selection Shrink Selection.
Code folding (7)
Shortcut Action What it does
Ctrl + NumPad Plus Expand Expand.
Ctrl + NumPad Minus Collapse Collapse.
Ctrl + Alt + NumPad Plus Expand Recursively Expand Recursively.
Ctrl + Alt + NumPad Minus Collapse Recursively Collapse Recursively.
Ctrl + Shift + NumPad Plus Expand All Expand All.
Ctrl + Shift + NumPad Minus Collapse All Collapse All.
Ctrl + . Fold Selection Fold Selection.
Multiple carets and selection ranges (11)
Shortcut Action What it does
Alt + Shift + Click Add/Remove Caret Add/Remove Caret.
Alt + Shift + Insert Toggle Column Selection Mode Toggle Column Selection Mode.
Double Ctrl + Up Clone Caret Above Clone Caret Above.
Double Ctrl + Down Clone Caret Below Clone Caret Below.
Alt + Shift + G Add Caret to Each Line in Selection Add Caret to Each Line in Selection.
Alt + J Add Selection for Next Occurrence Add Selection for Next Occurrence.
Ctrl + Alt + Shift + J Select All Occurrences Select All Occurrences.
Alt + Shift + J Deselect Last Occurrence Deselect Last Occurrence.
Alt + Shift + Middle-Click Create Rectangular Selection Create Rectangular Selection.
Alt + Click Drag to Create Rectangular Selection Drag to Create Rectangular Selection.
Ctrl + Alt + Shift + Click Drag to Create Multiple Rectangular Selections Drag to Create Multiple Rectangular Selections.
Coding assistance (18)
Shortcut Action What it does
Alt + Enter Show Intention Actions Show Intention Actions.
Ctrl + Space Basic Completion Basic Completion.
Ctrl + Shift + Space Type-Matching Completion Type-Matching Completion.
Ctrl + Alt + Space Second Basic Completion Second Basic Completion.
Ctrl + Shift + Enter Complete Current Statement Complete Current Statement.
Ctrl + Alt + L Reformat Code Reformat Code.
Ctrl + P Parameter Info Parameter Info.
Ctrl + Q Quick Documentation Quick Documentation.
Ctrl + Shift + Up Move Statement Up Move Statement Up.
Ctrl + Shift + Down Move Statement Down Move Statement Down.
Ctrl + Alt + Shift + Left Move Element Left Move Element Left.
Ctrl + Alt + Shift + Right Move Statement Right Move Statement Right.
Alt + Shift + Up Move Line Up Move Line Up.
Alt + Shift + Down Move Line Down Move Line Down.
Ctrl + / Comment with Line Comment Comment with Line Comment.
Ctrl + Shift + / Comment with Block Comment Comment with Block Comment.
Ctrl + Alt + T Surround With Surround With.
Alt + Insert Generate Generate.
Context navigation (22)
Shortcut Action What it does
Alt + Down Next Method Next Method.
Alt + Up Previous Method Previous Method.
Ctrl + G Go to Line/Column Go to Line/Column.
Ctrl + Tab Switcher Switcher.
Alt + F1 Select In Select In.
Ctrl + E Recent Files Recent Files.
Alt + Shift + C Recent Changes Recent Changes.
Ctrl + Shift + Backspace Last Edit Location Last Edit Location.
Ctrl + Alt + Left Back Back.
Ctrl + Alt + Right Forward Forward.
Alt + Right Select Next Tab Select Next Tab.
Alt + Left Select Previous Tab Select Previous Tab.
F11 Toggle Anonymous Bookmark Toggle Anonymous Bookmark.
Ctrl + Shift + [digit] Toggle Bookmark with Digit Toggle Bookmark with Digit.
Ctrl + F11 Toggle Bookmark with Mnemonic Toggle Bookmark with Mnemonic.
Shift + F11 Show All Bookmarks Show All Bookmarks.
Ctrl + [digit] Go to Bookmark with Digit Go to Bookmark with Digit.
Ctrl + Shift + F11 Show Mnemonic Bookmarks Show Mnemonic Bookmarks.
Alt + 7 Show Structure window Show Structure window.
Alt + 3 Show Find window Show Find window.
Ctrl + Alt + Down Next Occurrence Next Occurrence.
Ctrl + Alt + Up Previous Occurrence Previous Occurrence.
Find everything (12)
Shortcut Action What it does
Double Shift Search Everywhere Search Everywhere.
Ctrl + F Find Find.
F3 Find Next / Move to Next Occurrence Find Next / Move to Next Occurrence.
Shift + F3 Find Previous / Move to Previous Occurrence Find Previous / Move to Previous Occurrence.
Ctrl + R Replace Replace.
Ctrl + Shift + F Find in Files Find in Files.
Ctrl + Shift + R Replace in Files Replace in Files.
Ctrl + F3 Next Occurrence of the Word at Caret Next Occurrence of the Word at Caret.
Ctrl + Shift + N Go to File Go to File.
Ctrl + F12 File Structure File Structure.
Ctrl + Alt + Shift + N Go to Symbol Go to Symbol.
Ctrl + Shift + A Find Action Find Action.
Navigate from symbols (4)
Shortcut Action What it does
Alt + F7 Find Usages Find Usages.
Ctrl + B Go to Declaration Go to Declaration.
Ctrl + Alt + F7 Show Usages Show Usages.
Ctrl + Shift + F7 Highlight Usages in File Highlight Usages in File.
Code analysis (6)
Shortcut Action What it does
Alt + Enter Show Intention Actions Show Intention Actions.
Ctrl + F1 Error Description Error Description.
F2 Next Highlighted Error Next Highlighted Error.
Shift + F2 Previous Highlighted Error Previous Highlighted Error.
Ctrl + Alt + Shift + I Run Inspection by Name Run Inspection by Name.
Alt + 6 Show Problems window Show Problems window.
Run and debug (27)
Shortcut Action What it does
Double Ctrl Run Anything Run Anything.
Shift + F10 Run context configuration Run context configuration.
Alt + Shift + F10 Run Run.
Shift + F9 Debug context configuration Debug context configuration.
Alt + Shift + F9 Debug Debug.
Ctrl + Alt + F5 Attach to Process Attach to Process.
Ctrl + F2 Stop Stop.
F9 Resume Program Resume Program.
Ctrl + Shift + F2 Stop Background Processes Stop Background Processes.
F8 Step Over Step Over.
Alt + Shift + F8 Force Step Over Force Step Over.
F7 Step Into Step Into.
Shift + F7 Smart Step Into Smart Step Into.
Alt + Shift + F7 Force Step Into Force Step Into.
Shift + F8 Step Out Step Out.
Alt + F9 Run To Cursor Run To Cursor.
Ctrl + Alt + F9 Force Run To Cursor Force Run To Cursor.
Alt + F10 Show Execution Point Show Execution Point.
Alt + F8 Evaluate Expression Evaluate Expression.
Ctrl + Alt + F8 Quick Evaluate Expression Quick Evaluate Expression.
Ctrl + F8 Toggle Line Breakpoint Toggle Line Breakpoint.
Ctrl + Alt + Shift + F8 Toggle Temporary Line Breakpoint Toggle Temporary Line Breakpoint.
Ctrl + Shift + F8 View Breakpoints View Breakpoints.
Ctrl + Shift + F8 Edit Breakpoint Edit Breakpoint.
Alt + 4 Show Run window Show Run window.
Alt + 5 Show Debug window Show Debug window.
Alt + 8 Show Services window Show Services window.
Refactorings (6)
Shortcut Action What it does
Ctrl + Alt + Shift + T Refactor This Refactor This.
Shift + F6 Rename Rename.
Ctrl + F6 Change Signature Change Signature.
F6 Move Move.
Ctrl + Alt + P Introduce Parameter Introduce Parameter.
Ctrl + Alt + V Introduce Variable Introduce Variable.
Global VCS actions (9)
Shortcut Action What it does
Alt + ` VCS Operations Popup VCS Operations Popup.
Ctrl + K Commit Commit.
Ctrl + T Update Project Update Project.
Ctrl + Alt + Z Rollback Rollback.
Ctrl + Shift + K Push Push.
Ctrl + Alt + Shift + Down Next Change Next Change.
Ctrl + Alt + Shift + Up Previous Change Previous Change.
Alt + 9 Show Version Control window Show Version Control window.
Alt + 0 Show Commit window Show Commit window.
Diff Viewer (8)
Shortcut Action What it does
Ctrl + D Show Diff Show Diff.
Ctrl + D Compare Files Compare Files.
F7 Next Difference Next Difference.
Shift + F7 Previous Difference Previous Difference.
Ctrl + Alt + R Accept Left Side Accept Left Side.
Ctrl + Alt + A Accept Right Side Accept Right Side.
Ctrl + Shift + Tab Select Opposite Diff Pane Select Opposite Diff Pane.
Ctrl + Shift + D Show Diff Settings Popup Show Diff Settings Popup.
Tool windows (18)
Shortcut Action What it does
Shift + Esc Hide Active Tool Window Hide Active Tool Window.
Ctrl + Shift + F12 Hide All Tool Windows Hide All Tool Windows.
F12 Jump to Last Tool Window Jump to Last Tool Window.
Ctrl + Alt + Shift + Left Stretch to Left Stretch to Left.
Ctrl + Alt + Shift + Right Stretch to Right Stretch to Right.
Ctrl + Alt + Shift + Up Stretch to Top Stretch to Top.
Ctrl + Alt + Shift + Down Stretch to Bottom Stretch to Bottom.
N/A Show Database Explorer Show Database Explorer.
Alt + 2 Show Files window Show Files window.
Alt + 3 Show Find window Show Find window.
Alt + 4 Show Run window Show Run window.
Alt + 5 Show Debug window Show Debug window.
Alt + 6 Show Problems window Show Problems window.
Alt + 7 Show Structure window Show Structure window.
Alt + 8 Show Services window Show Services window.
Alt + 9 Show Version Control window Show Version Control window.
Alt + 0 Show Commit window Show Commit window.
Alt + F12 Show Terminal window Show Terminal window.
Frequently Asked Questions
What are the most useful DataGrip keyboard shortcuts? The most essential DataGrip shortcuts are: Double Shift (Search Everywhere), Ctrl + Shift + A (Find Action), Ctrl + Enter (Execute statement), Ctrl + / (Toggle comment).
What is the DataGrip shortcut for execute query? The DataGrip shortcut for execute query is Ctrl + Enter. Execute current query.
What's the fastest way to learn all DataGrip shortcuts? Print the DataGrip cheat sheet and keep it next to your keyboard for the first week, then switch to active recall: open Shortcut Speedrun and practice DataGrip shortcuts against the clock until they're automatic.
Can I combine DataGrip shortcuts with other tools? Yes — use My Stack to combine DataGrip shortcuts with any other platform on this site into one printable reference, which is useful if your daily workflow spans several tools.
🔧 Spotted an error or a missing shortcut?
Suggest an edit on GitHub — every accepted fix goes live on this page, the API and the CLI.
Running SQL
Ctrl + Enter executes the statement under the cursor (or the selection) against the console's data source; when the console holds several statements DataGrip shows a chooser whose list always includes running all of them. Ctrl + / toggles a line comment for parking a statement, and Ctrl + Alt + L formats the SQL to the dialect-aware style. Ctrl + Q on a table or column name shows its definition, comments and sample data as quick documentation.
Data and schema
F4 on a data source opens its query console, and on a table opens its data in an editable grid; changes are staged and submitted with Ctrl + Enter in the grid, with the generated SQL visible first. Refreshing the data source's schema after changes made elsewhere is a toolbar action in the explorer. Shift + F6 renames a table or column and generates the ALTER statement plus updates to references; Alt + F7 finds usages of a column across views and routines.
Navigation shared with the family
Shift + Shift searches everything — tables, columns, consoles, actions — across all data sources, with Ctrl + Shift + A for any action you can name. Ctrl + E lists recent consoles and tables, Ctrl + D duplicates a line, F2 jumps to the next error in the SQL, and Ctrl + Shift + F searches text across scripts and routines.
🤖 Ask AI about DataGrip shortcuts
Open your assistant with this page preloaded as the source — great for follow-up questions like "which of these work in other apps?"