DataGrip HotKeys

2025 年 1 月 14 日

DataGrip, a database IDE by JetBrains, is a powerful tool for developers managing and querying databases. Knowing its shortcut keys can significantly boost productivity and streamline workflows.

DataGrip Windows Shortcut Keys

SQL EDITOR

shortcut action
Ctrl + Alt + L Reformat code
Alt + J + Alt + Shift + J Place / delete another caret to the next occurrence
Ctrl + Shift + / Comment/uncomment: With block comment
Ctrl + W + Ctrl + Shift + W Increase or decrease syntax-aware selection
Ctrl + Y Delete current line or selected block
Ctrl + Shift + V Paste from recent buffers
Ctrl + P Column names info (within VALUES clause)
Ctrl + Shift + U Toggle case for word or selected block
Alt + Shift + Click Place multicarets
Ctrl + C Copy to clipboard
Ctrl + Q Quick info lookup
Ctrl + X Cut to clipboard
Ctrl + / Comment/uncomment: With line comment
Shift + enter Start new line
Alt + enter Show intention actions and quick-fixes
Ctrl + D Duplicate current line or selected block
Ctrl + Shift + J Join lines
Ctrl + P Parameter info (within method call arguments)
Ctrl + F4 Close active console/editor tab
Alt + Insert Generate code (Tables, functions, procedures)

SEARCH/REPLACE

shortcut action
Alt + F7 Find usages
Ctrl + Shift + A Find any action inside the IDE
Ctrl + Alt + F7 Show usages
Ctrl + Shift + F + Ctrl + Shift + R Find / Replace in path
Ctrl + F + Ctrl + R Find / Replace
Double + Shift Search everywhere

NAVIGATION

shortcut action
Alt + 1 Show: Database explorer
Ctrl + F12 Show: File structure popup
F4 Jump to table’s data
Ctrl + Alt + Shift + N Go to: Any object
Esc Return focus to editor
Ctrl + N Go to: Table/procedure, etc.
Ctrl + F6 Modify object
Ctrl + B Jump to DDL
Ctrl + Shift + E Show: Recent locations
Ctrl + Alt + left + Ctrl + Alt + right Go back / forward
Alt + F1 Show: Current file or object in any view
Ctrl + Shift + N Go to: File

MAIN

shortcut action
Ctrl + B + Ctrl + Click Go to declaration
Ctrl + Alt + G Generate SQL for object
Shift + Ctrl + Alt + F Full-text search in a database
Shift + F6 Rename
Ctrl + Shift + F12 Show only editor
Ctrl + enter Execute statement
Ctrl + E Recent files/consoles popup
Ctrl + space Code completion

DATA EDITOR

shortcut action
Ctrl + Alt + Z Revert changes
Ctrl + space Value completion
Shift + space Select row
Ctrl + Q Quick cell/row view
Shift + enter Maximize cell view
F4 Go to related data
Ctrl + F12 Column list
Alt + F7 Go to referencing data
Ctrl + enter Submit changes
Ctrl + F Text search

DataGrip macOS Shortcut Keys

SEARCH/REPLACE

shortcut action
+ F + + R Find / Replace
+ + A Find any action inside the IDE
+ + F7 Show usages
+ F7 Find usages
+ + F + + + R Find / Replace in path
Double + Search everywhere

DATA EDITOR

shortcut action
+ F Text search
+ Submit changes
+ F12 Column list
+ Select row
+ Maximize cell view
+ + Z Revert changes
+ F7 Go to referencing data
+ Go to related data
+ Value completion
F1 Quick cell/row view

MAIN

shortcut action
+ Code completion
+ B + + Click Go to declaration
+ Execute statement
+ + G Generate SQL for object
+ F6 Rename
+ + F12 Show only editor
+ + + F Full-text search in a database
+ E Recent files/consoles popup

SQL EDITOR

shortcut action
+ + L Reformat code
+ + U Toggle case for word or selected block
+ P Column names info (within VALUES clause)
+ D Duplicate current line or selected block
+ Start new line
+ C Copy to clipboard
+ + J Join lines
+ G + + + G Place / delete another caret to the next occurrence
+ + V Paste from recent buffers
+ Show intention actions and quick-fixes
+ + Click Place multicarets
+ + + Increase or decrease syntax-aware selection
+ N Generate code (Tables, functions, procedures)
+ W Close active console/editor tab
+ + / Comment/uncomment: With block comment
+ X Cut to clipboard
+ Delete current line or selected block
F1 Quick info lookup
+ / Comment/uncomment: With line comment
+ P Parameter info (within method call arguments)

NAVIGATION

shortcut action
+ [ + + ] Go back / forward
+ 1 Show: Database explorer
Return focus to editor
+ F1 Show: Current file or object in any view
+ F6 Modify object
+ B Jump to DDL
+ + O Go to: Any object
+ O Go to: Table/procedure, etc.
+ + E Show: Recent locations
+ F12 Show: File structure popup
+ + O Go to: File
F4 Jump to table’s data

About DataGrip

DataGrip is a robust database IDE designed to meet the needs of SQL developers. Supporting various databases, it offers smart code completion, robust query execution, and schema management.

DataGrip Official Information

Frequently Asked Questions about DataGrip Shortcut Keys

  1. How do I customize shortcut keys in DataGrip?
    Go to File > Settings (or Preferences on macOS) > Keymap. Here, you can search for specific actions and assign custom shortcuts.

  2. Can I export my shortcut settings to another machine?
    Yes. Use File > Export Settings, select the Keymaps option, and save the settings file. Import it on another machine using File > Import Settings.

  3. What are the most frequently used shortcuts in DataGrip?
    Commonly used shortcuts include:

    • Ctrl+Enter (Command+Enter on macOS): Execute query.
    • Ctrl+D (Command+D on macOS): Duplicate line.
    • Ctrl+F (Command+F on macOS): Find in file.
  4. Is there a way to reset shortcuts to default in DataGrip?
    Yes. Go to File > Settings (or Preferences on macOS) > Keymap. Click the gear icon and choose Reset to Default Settings.

  5. Can I use DataGrip shortcuts in other JetBrains IDEs?
    Many shortcuts are consistent across JetBrains IDEs, such as IntelliJ IDEA, PyCharm, and WebStorm. However, some may differ due to tool-specific features.

  6. How do I execute multiple queries at once in DataGrip?
    Highlight the queries you want to execute and press Ctrl+Enter (Command+Enter on macOS). If no text is highlighted, the current query under the cursor will run.

  7. Are DataGrip shortcuts compatible with all database types?
    Yes, the shortcuts are IDE-specific and independent of the database type. They work uniformly across all supported databases.

  8. What is the shortcut to view database connections?
    Use Alt+1 (Command+1 on macOS) to open the Database tool window, which lists all connections.

  9. Can I search for shortcut keys directly within DataGrip?
    Yes. Use the Ctrl+Shift+A (Command+Shift+A on macOS) shortcut to open the "Find Action" dialog, where you can search for actions and their assigned shortcuts.

Conclusion

Mastering DataGrip shortcut keys can significantly enhance productivity for database developers. This guide offers a comprehensive overview of essential shortcuts, grouped by functionality for both Windows and macOS users.

4/5 - (2 votes)