61

What is the "Abbreviation" feature in IntelliJ IDEA Keymap for? Web help on Keymap is silent about it.

IntelliJ Keymap abbreviation screenshot

ROMANIA_engineer
  • 54,432
  • 29
  • 203
  • 199
Konrad Jamrozik
  • 3,254
  • 5
  • 29
  • 59

1 Answers1

63

According to Andrey Dernov from JetBrains Support:

You use abbreviation added in keymap for quick search an action when "Search everywhere" (double Shift).

After adding "foobar" abbreviation to Git annotation command.

enter image description here

I can find the abbreviation and invoke the command with double Shift.

enter image description here

Unfortunately, the functionality does not support partial entry.

enter image description here

I personally find Shift-⌘-A easier to use in that case, because the results are limited to commands only.

PS: JetBrains support rocks!

Update: There was a follow-up from JetBrains:

The feature was recently added in IDEA, we haven't had time to update the documentation yet. We will do it in near future.

kukido
  • 10,431
  • 1
  • 45
  • 52
  • 2
    Thanks, but I have no luck invoking an abbreviation defined in a keymap using any of the "live template" shortcuts. Can you give me a concrete example on how to invoke a custom-defined keymap abbreviation? Say, a custom `annot` abbreviation defined on the `Main menu -> VCS -> Git -> Annotate` action. – Konrad Jamrozik Dec 28 '13 at 12:44
  • 1
    @KonradJamrozik Actually, I'm having troubles invoking keymap abbreviations myself. I sent an email to IntelliJ support asking for clarification. I will update the answer once I get a reply from them. – kukido Dec 28 '13 at 19:59
  • 1
    @KonradJamrozik Updated the answer with info from JetBrains. – kukido Dec 30 '13 at 18:13
  • 1
    Thanks! I guess it might be helpful for very short abbreviations (max 3 letters) for actions that don't always show up as first option in `Find Action...` box. For example, when I search for `keymap` I get `Default keymap reference` instead of `Keymap`, so abbreviation like `km` would be useful. – Konrad Jamrozik Dec 30 '13 at 21:42
  • 1
    +1 to the question and answer both. Very nice feature! It's like a poor man's command-mode. – yshavit Mar 24 '14 at 06:35
  • I had added an abbreviation to a shortcut because I didn't know what that was for. After I read this, I tried looking up the shortcut by abbreviation. It couldn't be found. Inspired by another comment here to use short abbreviations, I made a much shorter abbreviation, and it worked. Apparently there is a limit to how long an abbreviation should be, but IntelliJ IDEA doesn't give an error when assigning an abbreviation that is "too long". It just silently fails. – Mr. Lance E Sloan Feb 10 '22 at 21:23