Skip to content

Latest commit

 

History

History
202 lines (163 loc) · 5.07 KB

jetbrains.md

File metadata and controls

202 lines (163 loc) · 5.07 KB

JetBrains Shortcuts

The shortcuts in other IDEs from JetBrains are same as IntelliJ IDEA, such as CLion , PhpStorm , RubyMine , PyCharm and so on.


References

Preferences

  • Quick Guide: IntelliJ IDEAHelpKeymap Reference
  • Advance Settings: IntelliJ IDEAPreferences…Keymap

Refactor

  • ^ ⌥ t Refactor This
  • ^ ⌥ o Optimize Imports
  • ⌥ ⌘ l Reformat Code
    • The rules for reformation can be modified in:
    • PreferencesEditorCode Style → Select the programming language.
  • ⌥ ⌘ e Rename $variableName, ClassName, functionName
    • Auto rename other related code
  • ⌥ ⌘ n Inline Variable
  • ⌥ ⌘ v Extract Variable
  • ⌥ ⌘ m Extract Method
  • ⌥ ⌘ f Extract Field
  • ⌥ ⌘ c Extract Constant
  • F5 Copy File
  • F6 Move File

Code

  • ⌘ j Insert Live Template
  • ⌘ / Line Comment
  • ⌥ ⌘ / Block Comment
  • ⌥ ↑ Extend Selection
  • ⌥ ↓ Shrink Selection
  • ⌥ ↩ Show Intention Actions
  • ⇧ ⌘ ↩ Complete Current Statement
  • ^ ⌥ h Toggle Parameter Name
  • ^ ⌘ g Select All Occurrences
  • ^ ⇧ I Inspect Code
  • ⇧ ⌘ V Copy from History

Debug

  • ^ ⇧ B Toggle Line BreakPoint
  • ^ ⇧ E Edit BreakPoint ( Break if conditional is true)
  • ^ ⇧ V View BreakPoints
  • ^ ⇧ W Add to Watches
  • ^ ⌥ w Add to Watches
  • ^ ⇧ R Run…
  • ^ ⇧ A Rerun
  • ^ ⇧ D Debug
  • ^ ⇧ S Stop
  • ^ ⇧ I Step Into
  • ^ ⇧ O Step Out
  • ^ ⇧ N Resume Program ( Next BreakPoint )
  • ^ ⇧ J Step Over ( Next Line )

File

  • ⇧ ⌘ C Copy Path
  • ^ ⌥ r Copy Reference ( File:Line | Class::method() )
  • ⇧ ↩ Open in a new Editor Window ( in Project View)

Find

  • ⌘ f Find
  • ⇧ ⌘ F Find in Paths
  • ⌘ r Replace
  • ⇧ ⌘ R Replace in Paths
  • ⌘ g Find Next
  • ⇧ ⌘ G Find Prev
  • ^ ⌥ g Toggle Regex
  • ^ ⌥ c Toggle Case Sensitive
  • ^ g Find Usage
  • ^ s Find Complementation
  • ⌘ o Find Class
  • ⇧ ⌘ O Find File
  • ⌥ ⌘ o Find Symbols ( Class, Files, Methods, Functions )
  • ⇧, ⇧ Search (Everything) Everywhere
  • ⇧ ⌘ A Find Actions

Navigate

  • F2 Next Highlighted Error
  • ⇧ F2 Prev Highlighted Error
  • ⌥ F1 Select current file or symbol in any view
  • ^ ⇧ j Next Method
  • ^ ⇧ k Prev Method
  • ⌘ e Recent Files
  • ⇧ ⌘ E Recently Edited Files
  • ⇧ ⌘ T Test Subject: Jump to Test for current file | Create Test for it
  • ⌘ u Super Class or Interface
  • ⌘ ↑ Navigation Bar
  • ⌘ 1~9 Jump to the specified Tool Window | Hide it
  • ⌘ 1 Project
  • ⌘ 2 Favorites ( Projects, Bookmarks, Breakpoints )
  • ⌘ 3 Find
  • ⌘ 4 Debug
  • ⌘ 9 Version Control
  • ^ m Toggle Bookmark
  • ^ ⌥ m View Bookmarks
  • ^ ⌥ j Next Bookmark
  • ^ ⌥ k Prev Bookmark
  • ⌘ 6 Todo
  • ⌘ 7 Structure

VCS: History & Compare

  • ^ ⌥ l Local History -> Show History
  • ^ ⌥ a Git -> Annotate
  • ^ ⌥ v Git -> Compare with the Same Repository Version
  • ^ ⌥ b Git -> Compare with Branch …
  • ^ ⌥ . Git -> Compare with …
  • ^ ⌥ c Git -> Resolve Conflicts
  • ⌘ t Update Porject from VCS
  • ^ ⇧ C Commit Project to VCS
  • ⌥ ⌘ g 'VCS' Operations Quick Popup

Tools

  • ^ ⌘ h Hide All Tool Windows
  • ^ ⌥ q Terminal
  • ^ ⌥ s Test RESTful Web Service
  • ⇧ ⌘ ↑↓←→ Extend | Shrink Tool Window

IdeaVim

IdeaVim: https://plugins.jetbrains.com/plugin/164?pr=idea

  • It is the best Vim-Emulator plugin for IDEs from JetBrains.
  • Its most keys are the same as Vim, so I just list my custom keys.
  • My config file: .ideavimrc

Ctags Like

  • ^ ] Find Declaration
  • ^ t Back from Declaration

Tab

  • H Prev Tab
  • L Next Tab
  • , Leader Key
  • , a = 1gt
  • , s = 2gt
  • … d f g h j k …
  • , l = 9gt
  • , ; = 10gt
  • , 1 = 11gt
  • , 2 = 12gt
  • , 9 = 19gt
  • , 0 = 20gt

Emacs

Mimic Emacs in Insert Mode:

  • ^ b =
  • ^ f =
  • ^ p Forward Word
  • ^ n Backward Word
  • ^ a = Home
  • ^ e = End
  • ^ k Del to End of Line
  • ^ u Del to Head of Line
  • ^ t Exchange Chars ( Before & After Cursor )

Vim-Surround

  • ds* Delete Surround
    • such as ds' ds" ds[ ds{ ds` dst ( t for HTML Tag ) …
  • ys** Add Surround:
    • 1st * for Postion ( Start or Stop )
    • 2rd * for Surround Char (or HTML Tag)
    • such as yse' ysW" ysfb[ ysTh{
  • cs** Change Surround
    • 1st * for Current Surround Char
    • 2rd * for New Surround Char
    • such as cs'" cs[{ cst<p>

Ace-Jump

  • ^ ;

Others

  • ^ r = :redo<CR> Redo
  • ⇧ K = Jx Join curren line and next line without breaking concated spacing