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)

ShortcutActionWhat it does
F4Open a query console for the selected data sourceSelect the data source in the Database Explorer first; the console is already connected, so you can type and run SQL right away.
Ctrl + EnterExecute the statement under the caret or the selectionIf the console holds several statements DataGrip shows a chooser; the list always includes an option to run all of them.
Ctrl + Shift + QOpen a new query consoleFaster than the toolbar button; each console keeps its own session.

Basic editing (23)

ShortcutActionWhat it does
Ctrl + XCutCut.
Ctrl + CCopyCopy.
Ctrl + VPastePaste.
Ctrl + Alt + Shift + VPaste as Plain TextPaste as Plain Text.
Ctrl + Shift + VPaste from HistoryPaste from History.
Ctrl + Shift + CCopy PathsCopy Paths.
Ctrl + Alt + Shift + CCopy ReferenceCopy Reference.
Ctrl + SSave AllSave All.
Ctrl + ZUndoUndo.
Ctrl + Shift + ZRedoRedo.
TabIndent SelectionIndent Selection.
Shift + TabUnindent Line or SelectionUnindent Line or Selection.
Ctrl + Alt + IAuto-Indent LinesAuto-Indent Lines.
Shift + EnterStart New LineStart New Line.
Ctrl + Alt + EnterStart New Line Before CurrentStart New Line Before Current.
Ctrl + YDelete LineDelete Line.
Ctrl + Shift + JJoin LinesJoin Lines.
Ctrl + DDuplicate Line or SelectionDuplicate Line or Selection.
Ctrl + Shift + UToggle CaseToggle Case.
Ctrl + Alt + Shift + InsertScratch FileScratch File.
Shift + F4Open Source in New WindowOpen Source in New Window.
Alt + Shift + .Increase Font Size in All EditorsIncrease Font Size in All Editors.
Alt + Shift + CommaDecrease Font Size in All EditorsDecrease Font Size in All Editors.

Caret navigation (15)

ShortcutActionWhat it does
Ctrl + LeftMove Caret to Previous WordMove Caret to Previous Word.
Ctrl + RightMove Caret to Next WordMove Caret to Next Word.
HomeMove Caret to Line StartMove Caret to Line Start.
EndMove Caret to Line EndMove Caret to Line End.
Ctrl + Shift + MMove Caret to Matching BraceMove Caret to Matching Brace.
Ctrl + [Move Caret to Code Block StartMove Caret to Code Block Start.
Ctrl + ]Move Caret to Code Block EndMove Caret to Code Block End.
Alt + DownNext MethodNext Method.
Alt + UpPrevious MethodPrevious Method.
Ctrl + Page UpMove Caret to Page TopMove Caret to Page Top.
Ctrl + Page DownMove Caret to Page BottomMove Caret to Page Bottom.
Page UpPage UpPage Up.
Page DownPage DownPage Down.
Ctrl + HomeMove Caret to Text StartMove Caret to Text Start.
Ctrl + EndMove Caret to Text EndMove Caret to Text End.

Select text (19)

ShortcutActionWhat it does
Ctrl + ASelect AllSelect All.
Shift + LeftLeft with SelectionLeft with Selection.
Shift + RightRight with SelectionRight with Selection.
Ctrl + Shift + LeftMove Caret to Previous Word with SelectionMove Caret to Previous Word with Selection.
Ctrl + Shift + RightMove Caret to Next Word with SelectionMove Caret to Next Word with Selection.
Shift + HomeMove Caret to Line Start with SelectionMove Caret to Line Start with Selection.
Shift + EndMove Caret to Line End with SelectionMove Caret to Line End with Selection.
Shift + UpUp with SelectionUp with Selection.
Shift + DownDown with SelectionDown with Selection.
Ctrl + Shift + [Move Caret to Code Block Start with SelectionMove Caret to Code Block Start with Selection.
Ctrl + Shift + ]Move Caret to Code Block End with SelectionMove Caret to Code Block End with Selection.
Ctrl + Shift + Page UpMove Caret to Page Top with SelectionMove Caret to Page Top with Selection.
Ctrl + Shift + Page DownMove Caret to Page Bottom with SelectionMove Caret to Page Bottom with Selection.
Shift + Page UpPage Up with SelectionPage Up with Selection.
Shift + Page DownPage Down with SelectionPage Down with Selection.
Ctrl + Shift + HomeMove Caret to Text Start with SelectionMove Caret to Text Start with Selection.
Ctrl + Shift + EndMove Caret to Text End with SelectionMove Caret to Text End with Selection.
Ctrl + WExtend SelectionExtend Selection.
Ctrl + Shift + WShrink SelectionShrink Selection.

Code folding (7)

ShortcutActionWhat it does
Ctrl + NumPad PlusExpandExpand.
Ctrl + NumPad MinusCollapseCollapse.
Ctrl + Alt + NumPad PlusExpand RecursivelyExpand Recursively.
Ctrl + Alt + NumPad MinusCollapse RecursivelyCollapse Recursively.
Ctrl + Shift + NumPad PlusExpand AllExpand All.
Ctrl + Shift + NumPad MinusCollapse AllCollapse All.
Ctrl + .Fold SelectionFold Selection.

Multiple carets and selection ranges (11)

ShortcutActionWhat it does
Alt + Shift + ClickAdd/Remove CaretAdd/Remove Caret.
Alt + Shift + InsertToggle Column Selection ModeToggle Column Selection Mode.
Double Ctrl + UpClone Caret AboveClone Caret Above.
Double Ctrl + DownClone Caret BelowClone Caret Below.
Alt + Shift + GAdd Caret to Each Line in SelectionAdd Caret to Each Line in Selection.
Alt + JAdd Selection for Next OccurrenceAdd Selection for Next Occurrence.
Ctrl + Alt + Shift + JSelect All OccurrencesSelect All Occurrences.
Alt + Shift + JDeselect Last OccurrenceDeselect Last Occurrence.
Alt + Shift + Middle-ClickCreate Rectangular SelectionCreate Rectangular Selection.
Alt + ClickDrag to Create Rectangular SelectionDrag to Create Rectangular Selection.
Ctrl + Alt + Shift + ClickDrag to Create Multiple Rectangular SelectionsDrag to Create Multiple Rectangular Selections.

Coding assistance (18)

ShortcutActionWhat it does
Alt + EnterShow Intention ActionsShow Intention Actions.
Ctrl + SpaceBasic CompletionBasic Completion.
Ctrl + Shift + SpaceType-Matching CompletionType-Matching Completion.
Ctrl + Alt + SpaceSecond Basic CompletionSecond Basic Completion.
Ctrl + Shift + EnterComplete Current StatementComplete Current Statement.
Ctrl + Alt + LReformat CodeReformat Code.
Ctrl + PParameter InfoParameter Info.
Ctrl + QQuick DocumentationQuick Documentation.
Ctrl + Shift + UpMove Statement UpMove Statement Up.
Ctrl + Shift + DownMove Statement DownMove Statement Down.
Ctrl + Alt + Shift + LeftMove Element LeftMove Element Left.
Ctrl + Alt + Shift + RightMove Statement RightMove Statement Right.
Alt + Shift + UpMove Line UpMove Line Up.
Alt + Shift + DownMove Line DownMove Line Down.
Ctrl + /Comment with Line CommentComment with Line Comment.
Ctrl + Shift + /Comment with Block CommentComment with Block Comment.
Ctrl + Alt + TSurround WithSurround With.
Alt + InsertGenerateGenerate.

Context navigation (22)

ShortcutActionWhat it does
Alt + DownNext MethodNext Method.
Alt + UpPrevious MethodPrevious Method.
Ctrl + GGo to Line/ColumnGo to Line/Column.
Ctrl + TabSwitcherSwitcher.
Alt + F1Select InSelect In.
Ctrl + ERecent FilesRecent Files.
Alt + Shift + CRecent ChangesRecent Changes.
Ctrl + Shift + BackspaceLast Edit LocationLast Edit Location.
Ctrl + Alt + LeftBackBack.
Ctrl + Alt + RightForwardForward.
Alt + RightSelect Next TabSelect Next Tab.
Alt + LeftSelect Previous TabSelect Previous Tab.
F11Toggle Anonymous BookmarkToggle Anonymous Bookmark.
Ctrl + Shift + [digit]Toggle Bookmark with DigitToggle Bookmark with Digit.
Ctrl + F11Toggle Bookmark with MnemonicToggle Bookmark with Mnemonic.
Shift + F11Show All BookmarksShow All Bookmarks.
Ctrl + [digit]Go to Bookmark with DigitGo to Bookmark with Digit.
Ctrl + Shift + F11Show Mnemonic BookmarksShow Mnemonic Bookmarks.
Alt + 7Show Structure windowShow Structure window.
Alt + 3Show Find windowShow Find window.
Ctrl + Alt + DownNext OccurrenceNext Occurrence.
Ctrl + Alt + UpPrevious OccurrencePrevious Occurrence.

Find everything (12)

ShortcutActionWhat it does
Double ShiftSearch EverywhereSearch Everywhere.
Ctrl + FFindFind.
F3Find Next / Move to Next OccurrenceFind Next / Move to Next Occurrence.
Shift + F3Find Previous / Move to Previous OccurrenceFind Previous / Move to Previous Occurrence.
Ctrl + RReplaceReplace.
Ctrl + Shift + FFind in FilesFind in Files.
Ctrl + Shift + RReplace in FilesReplace in Files.
Ctrl + F3Next Occurrence of the Word at CaretNext Occurrence of the Word at Caret.
Ctrl + Shift + NGo to FileGo to File.
Ctrl + F12File StructureFile Structure.
Ctrl + Alt + Shift + NGo to SymbolGo to Symbol.
Ctrl + Shift + AFind ActionFind Action.

Navigate from symbols (4)

ShortcutActionWhat it does
Alt + F7Find UsagesFind Usages.
Ctrl + BGo to DeclarationGo to Declaration.
Ctrl + Alt + F7Show UsagesShow Usages.
Ctrl + Shift + F7Highlight Usages in FileHighlight Usages in File.

Code analysis (6)

ShortcutActionWhat it does
Alt + EnterShow Intention ActionsShow Intention Actions.
Ctrl + F1Error DescriptionError Description.
F2Next Highlighted ErrorNext Highlighted Error.
Shift + F2Previous Highlighted ErrorPrevious Highlighted Error.
Ctrl + Alt + Shift + IRun Inspection by NameRun Inspection by Name.
Alt + 6Show Problems windowShow Problems window.

Run and debug (27)

ShortcutActionWhat it does
Double CtrlRun AnythingRun Anything.
Shift + F10Run context configurationRun context configuration.
Alt + Shift + F10RunRun.
Shift + F9Debug context configurationDebug context configuration.
Alt + Shift + F9DebugDebug.
Ctrl + Alt + F5Attach to ProcessAttach to Process.
Ctrl + F2StopStop.
F9Resume ProgramResume Program.
Ctrl + Shift + F2Stop Background ProcessesStop Background Processes.
F8Step OverStep Over.
Alt + Shift + F8Force Step OverForce Step Over.
F7Step IntoStep Into.
Shift + F7Smart Step IntoSmart Step Into.
Alt + Shift + F7Force Step IntoForce Step Into.
Shift + F8Step OutStep Out.
Alt + F9Run To CursorRun To Cursor.
Ctrl + Alt + F9Force Run To CursorForce Run To Cursor.
Alt + F10Show Execution PointShow Execution Point.
Alt + F8Evaluate ExpressionEvaluate Expression.
Ctrl + Alt + F8Quick Evaluate ExpressionQuick Evaluate Expression.
Ctrl + F8Toggle Line BreakpointToggle Line Breakpoint.
Ctrl + Alt + Shift + F8Toggle Temporary Line BreakpointToggle Temporary Line Breakpoint.
Ctrl + Shift + F8View BreakpointsView Breakpoints.
Ctrl + Shift + F8Edit BreakpointEdit Breakpoint.
Alt + 4Show Run windowShow Run window.
Alt + 5Show Debug windowShow Debug window.
Alt + 8Show Services windowShow Services window.

Refactorings (6)

ShortcutActionWhat it does
Ctrl + Alt + Shift + TRefactor ThisRefactor This.
Shift + F6RenameRename.
Ctrl + F6Change SignatureChange Signature.
F6MoveMove.
Ctrl + Alt + PIntroduce ParameterIntroduce Parameter.
Ctrl + Alt + VIntroduce VariableIntroduce Variable.

Global VCS actions (9)

ShortcutActionWhat it does
Alt + `VCS Operations PopupVCS Operations Popup.
Ctrl + KCommitCommit.
Ctrl + TUpdate ProjectUpdate Project.
Ctrl + Alt + ZRollbackRollback.
Ctrl + Shift + KPushPush.
Ctrl + Alt + Shift + DownNext ChangeNext Change.
Ctrl + Alt + Shift + UpPrevious ChangePrevious Change.
Alt + 9Show Version Control windowShow Version Control window.
Alt + 0Show Commit windowShow Commit window.

Diff Viewer (8)

ShortcutActionWhat it does
Ctrl + DShow DiffShow Diff.
Ctrl + DCompare FilesCompare Files.
F7Next DifferenceNext Difference.
Shift + F7Previous DifferencePrevious Difference.
Ctrl + Alt + RAccept Left SideAccept Left Side.
Ctrl + Alt + AAccept Right SideAccept Right Side.
Ctrl + Shift + TabSelect Opposite Diff PaneSelect Opposite Diff Pane.
Ctrl + Shift + DShow Diff Settings PopupShow Diff Settings Popup.

Tool windows (18)

ShortcutActionWhat it does
Shift + EscHide Active Tool WindowHide Active Tool Window.
Ctrl + Shift + F12Hide All Tool WindowsHide All Tool Windows.
F12Jump to Last Tool WindowJump to Last Tool Window.
Ctrl + Alt + Shift + LeftStretch to LeftStretch to Left.
Ctrl + Alt + Shift + RightStretch to RightStretch to Right.
Ctrl + Alt + Shift + UpStretch to TopStretch to Top.
Ctrl + Alt + Shift + DownStretch to BottomStretch to Bottom.
N/AShow Database ExplorerShow Database Explorer.
Alt + 2Show Files windowShow Files window.
Alt + 3Show Find windowShow Find window.
Alt + 4Show Run windowShow Run window.
Alt + 5Show Debug windowShow Debug window.
Alt + 6Show Problems windowShow Problems window.
Alt + 7Show Structure windowShow Structure window.
Alt + 8Show Services windowShow Services window.
Alt + 9Show Version Control windowShow Version Control window.
Alt + 0Show Commit windowShow Commit window.
Alt + F12Show Terminal windowShow Terminal window.
📜 Source: JetBrains — DataGrip documentation: Predefined Windows keymap (+ Run queries, Query consoles). The three console keys DataGrip documents in its Run queries and Query consoles pages, then every section of the “Predefined Windows keymap” reference page except the summary table, deduplicated. macOS swaps Ctrl for Cmd in most bindings and uses Option for Alt. Checked 2026-09-15. How we verify ›
📄 View Printable Cheat Sheet — Download as PDF or print · 🧩 Combine with other tools

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.

Related Shortcut Pages

VS Code Jupyter Notebook PyCharm Xcode Neovim / Vim WebStorm

Search 18,500+ shortcuts across 268 platforms

Explore All Platforms Practice Shortcuts
🔧 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?"

ChatGPT Claude Perplexity Gemini Grok