Skip to content

Instantly share code, notes, and snippets.

@mallowigi
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mallowigi/b94d2f06bce5abfc5ae2 to your computer and use it in GitHub Desktop.
Save mallowigi/b94d2f06bce5abfc5ae2 to your computer and use it in GitHub Desktop.
IntelliJ Keymap

Hola

Keymap

Editor actions

Completions

  • Add or remove caret: Alt + Left Click
    • Useful to write at multiple places at once
  • Choose lookup Item replace: Ctrl + Enter
    • Complete and replace
  • Toggle Case: Ctrl + U

Moving the cursor

  • Move Caret to Block End/Block Start: Ctrl + ]/Ctrl + [ (Abbrev: ])
    • Useful to go to the beginning/end of a block
  • Next Word/Previous Word: Ctrl+Left/Ctrl+Right
  • Scroll Up/Scroll Down: Ctrl + Down/ Ctrl + Up
    • Useful to scroll without the mouse
  • Move Caret to Text End/Text start: Ctrl + End/Ctrl + Home
  • Hungry Backspace: Alt + Backspace
    • Backspace that deletes all whitespace characters in one fell swoop

Lines

  • Delete Line: Ctrl + D (Abbrev: dd)
  • Duplicate Line: Alt + D (Abbrev: dl)
  • Select Line: Alt+L (Abbrev: vl)
  • Split Line: Ctrl + Enter
    • Split current line and add concatenation operators if necessary
  • Start New Line: Shift + Enter
    • Go to a new line without cutting the current line
  • Start New Line Before Current: Ctrl + Shift + Enter
    • Go to the previous line without cutting the current line
  • Join Lines: Ctrl + Shift + J (Abbrev: j)
    • Put content up to previous line, eliminating all space between

Words

  • Delete Word: Ctrl + Del (Abbrev: dw)
  • Delete Word Backwards: Ctrl + Backspace (Abbrev: dW)
  • Select Word: Alt+W (Abbrev: vw)
    • Hitting it more than once will select the upper unit: Camelcased words, sentence, block
  • Unselect Word: Shift+Alt+@

Other

  • Column selection mode: Alt+Shif+Insert (Abbrev: cuu)
    • Toggle placing caret anywhere
  • Toggle Sticky Selection: Alt+Shift+V ('Abbrev: v')
    • Click once to mark selection bound, twice to close it
  • Increase Font Size: Ctrl + NumPad +
  • Decrease Font Size: Ctrl + Numpad -
  • Emmet Everywhere: Ctrl+K, Tab (Abbrev: emmet)
    • Evaluate Emmet in any file

Main Menu

File

  • New: Alt + Insert
  • Save As: Ctrl+Shift+S
  • Save All: Ctrl + S
  • Settings: Ctrl + Alt + S

Edit

  • Paste from History: Ctrl + Shift + V (Abbrev: ph)
    • This saves all Ctrl + C in an history for quick reuse

Find

  • Find: Ctrl + F (Abbrev: /)

  • Replace: Ctrl + R (Abbrev: //)

  • Find Next: F3 (Abbrev: n)

  • Find Previous: Shift + F3 (Abbrev: N)

  • Find Word At Caret: Ctrl + F3 (Abbrev: /n)

  • Find In Path: Ctrl + H (Abbrev: find)

    • Find in the whole project
  • Replace In Path : Ctrl + Shift + R (Abbrev: repl)

    • Replace in the whoe project
  • Find Usages: Alt + F7 (Abbrev: /use)

    • Get all usages of the highlighted word
  • Show Usages: Ctrl+ Alt + F7

    • Same as Find usages but in a shorter window
  • HIghlight usages: Ctrl + Shift + F7

  • Select all Occurences: Ctrl+Alt+J (Abbrev: /all)

    • Select all occurences of the highlighted word for quick editing
  • Select Next occurence: Alt+J

    • Select next occurence of highlighted word
  • Unselect occurence: Shift+Alt+J

Doc

  • Quick definition: Ctrl+Shift+Space
    • See the definition of the function/property in a floating window
  • Quick documentation: Ctrl+Q
  • Parameter Info: Ctrl+P

Files

  • Jump To Source: F4
  • Recent Files: Ctrl+E (Abbrev: e)
    • Show a list of recently opened files
  • List all changes: Alt+Shift+E (Abbrev: eee)
    • Show the list of recent changes, useful to see what has been done recently
  • Compare two files: Select two files and Ctrl+D
  • View File Structure: Ctrl+Shift+F12
    • See all property and methods of the current file
  • Type Hierarchy: ``

Navigation

  • Go to class: Ctrl+N

  • Go to file: Ctrl+Shift+N

    • Use it a lot to go to a specific file quickly
  • Go to symbol: Ctrl+Alt+Shift+N/Alt+V

  • Go to line: Ctrl + G

  • [NEW] Go to region: Ctrl+Alt+Period

  • Back: Ctrl+Alt+Left

  • Forward: Ctrl+Alt+Right

    • Useful to quickly switch between locations
  • Jump to declaration: F12/Ctrl+Click (Abbrev: @)

    • Look up to the class/method/property/etc hovered
  • Jump to implementation: Alt+End (Abbrev: impl)

    • For interfaces only
  • Jump to super method: Alt+ Home (Abbrev: super)

    • For overriden methods only
  • Related files: Ctrl+Alt+Home (Abbrev: rel)

Highlights

  • Next Error: Ctrl+F2
  • Previous error: Ctrl+Shift+F2
  • Next occurence: Alt+PgDown
  • Previous occurence: Alt+PgUp
    • Quickly navigate from occurences of the highlighted word
  • Next Method: Alt+Down
  • Previous method: Alt+Up

Bookmarks

  • Bookmark location: Ctrl+K, Ctrl+K
    • To allow a specific location to be listed in the Bookmarks window
  • Bookmarks: Ctrl+Alt+K
  • Next Bookmark:Ctrl+K, Ctrl+N
  • Previous Bookmark: Ctrl+K, Ctrl+P

Code

  • Implement methods: Ctrl+Shift+Insert (Abbrev: implement)
    • Quickly insert placeholders for overridable methods of the parent class
  • Generate: Alt+Insert (Abbrev: new)
    • Generate a new file according to file templates
  • Surround with: Ctrl+Alt+T (Abbrev: surround)
    • Surround a piece of code with code (if, try-catch,
      , etc)
  • Expand word: Alt+Slash
    • Complete code with the first completion option, cyclically
  • Insert template: Ctrl+J (Abbrev: tpl)
  • Surround with template: Ctrl+Alt+J
  • Comment: Ctrl + Slash
  • Comment with block comment: Ctrl+Shift+Slash
  • Format code: Ctrl+Shift+F (Abbrev: fmt)
    • Auto indent, insert spaces, remove whitespaces, etc...
  • Inspect code: Alt+Shift+I (Abbrev: inspect)
  • Locate duplicates: Abbrev duplicates

Arranging code

  • Move block up/down: Ctrl+Alt+Up/Ctrl+Alt+Down
  • Move line up/down: Shift+Alt+Up/Shift+Alt+Down

Folding

  • Expand section/Collapse section: Ctrl+Alt+ Numpad+/Ctrl+Alt+ Numpad-
  • Expand All/Collapse all: Ctrl+Alt+Shift+NumPad-/Ctrl+Alt+Shift+NumPad+ (Abbrev: expand/collapse)

Refactoring

  • Rename: Alt+Shift+R (Abbrev: rename)
    • Quickly rename a variable, method, class...
  • Change signature: Alt+Shift+M (Abbrev: sign)
  • Safe delete: Alt+Delete (Abbrev: del)
  • Extract:
    • Variable: Ctrl+Alt+V
    • Constant: Ctrl+Alt+C
    • Field: Ctrl+Alt+F
    • Parameter: Ctrl+Alt+P
    • Method: Ctrl+Alt+M
  • Inline: Ctrl+Alt+I

Run and Debug

  • Run: F5
  • Debug: Shift+F5
  • Stop: F10
  • Step Over: F7
  • Step Into: F6
  • Step Out: F8
  • Resume: F9
  • Toggle breakpoint: Ctrl+F8
  • View breakpoints: Ctrl+Shift+F8 (Abbrev: breaks)

Tools

  • Run command: Ctrl+Shift+X
  • Open Grunt console: Ctrl+Shift+G
  • Open Terminal : Ctrl+Shift+T (Abbrev: term)
  • Deploy to default server: Ctrl+U (Abbrev: upload)
    • Automatic upload toggle: Ctrl+Alt+U

Version Control

  • Show Local history: Ctrl+Shift+H (Abbrev: hist)
    • Keeps a local history of all changes
  • Put label to history: Ctrl+K, Ctrl+Shift+H (Abbre: label)
    • Puts a label to the current state of the file, useful to for later uses
  • VCS Operations: Alt+Backquote
    • Show a list of possible actions related to VCS
  • Update project: Ctrl+T (Abbrev: fetch)
  • Annotate: Ctrl+Shift+Alt+A (Abbrev: annotate)
  • Compare with latest version: Ctrl+Shift+D
  • Show history: Alt+Shift+H (Abbrev: history)
  • Revert: Ctrl+Alt+Shift+R (Abbrev: revert)
  • Resolve conflicts: Ctrl+K, Ctrl+Alt+Shift+R (Abbrev: resolve)
  • Branches: Ctrl+Shift+B (Abbrev: branch)
  • Tags: Abbrev tag
  • Stash: Ctrl+K, Ctrl+Alt+S (Abbrev: stash)
  • Unstash: Ctrl+K, Ctrl+Alt+Shift+S (Abbrev: unstash)
  • Pull: Ctrl+Alt+Shift+P (Abbrev: pull)
  • Push: Ctrl+Shift+P (Abbrev: push)
  • Rebase: Ctrl+Alt+R (Abbrev: rebase)
  • Abort Rebase: Ctrl+K, Alt+R (Abbrev: abort)
  • Continue Rebase: Ctrl+K, Ctrl+R (Abbrev: continue)
  • Skip commit: Ctrl+K, Ctrl+Alt+R (Abbrev: skip)
  • Log: Ctrl+Shift+L

Window

  • Switch Frame: F2
    • Switch between instances of IntelliJ
  • Hide Active Tool Window: Shift+Escape
    • Close tool window
  • Close active Tab: Ctrl+Shift+F4
  • Split mode: Alt+Shift+P

Tabs

  • Next tab: Alt+Right
  • Previous Tab: Alt+Left
  • Close: Ctrl+W
  • Close All: Ctrl+Alt+W (Abbrev:ca)
  • Close Others: Ctrl+Alt+Shift+W (Abbrev: co)
  • Reopen closed tab: Ctrl+Shift+W (Abbrev: !c)
  • Split horizontally: Ctrl+Alt+1 (Abbrev: sph)
  • Split vertically: Ctrl+Alt+2 (Abbrev: spv)
  • Unsplit: Ctrl+Alt+3 (abbrev: unsplit)
  • Go to next split: Ctrl+Alt+F2
  • Go to previous split: Ctrl+Alt+Shift+F2
  • Move to right/left: Alt+Shift+Right/Left

Other

  • Toggle Presentation Mode: F11 (Abbrev: pres)
  • Toggle Full Screen Mode: Ctrl+F11 (Abbrev: full)
  • Quick Switch Color Scheme/Keymap: Ctrl+Backquote (Abbrev: ~)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment