Is there a shortcut to implement interface methods in intellij? - intellij-idea

When I type something along the line of this:
class Foo implements Bar{}
intellij idea highlights that line and then I have to hover over it with the mouse pointer until a red lightbulb pops up and click "Implement methods". Is there a keyboard shortcut for this?

Ctrl+I/Cmd+I (Windows/Mac) is the shortcut for "Implement Methods" in the default IntelliJ keymap.

It also depends on which Keymap you are using. For instance, I am using Jetbrains Rider on MacOS and the shortcut for implementing missing members is "Cmd+Shift+I".
To be able to learn your shortcut key, go to Preferences (Cmd + ',') and select Keymap. You can just type 'implementation' to the search bar on the right, or Navigate to the Main menu > Code > Implement Methods. You will see the shortcut defined according to your settings.

Related

Jump to implementation instead of declaration in IntelliJ

In IntelliJ I can click on an symbol while holding the Ctrl key which will let IntelliJ (in case of methods) navigate to the declaration. This is documented here.
If the method was defined in an interface, IntelliJ will open that interface but not the implementation.
Is there a way to tell IntelliJ always jump to the implementation if there is at least one or make it asking me which I want to jump to?
Navigate | Implementation(s), by default mapped to Ctr/Cmd+Alt+left mouse button I believe.

Intellij plugin keymap first-stroke value

I have implemented a plugin that I would now like to use. However, I do not understand and did not see clear documentation on how to assign keyboard shortcuts. I would like to activate it on a alt + enter key combination, but its not obvious what my keyboard-shortcut entry should be.
<keyboard-shortcut keymap="Mac OS X" first-keystroke="???"/>
I have the "Mac OS X" keymap set in preferences.
The shortcut for Alt-Enter is written as "alt ENTER". You can look at the default keymaps as an example for defining other keyboard shortcuts.
Note that Alt-Enter is already used by the quickfix menu in IntelliJ IDEA, so it may not be a good idea to use the same shortcut for your own action. If you want to extend the Alt-Enter menu, there are other mechanisms for that (intention actions).

Keyboard shortcut to switch between keybindings in Intellij

I'm a long time Emacs user who recently started developing with Intellij IDEA.
I've installed the Emacs+ plugin to get some keyboard shortcuts. However the experience is not optimal as some bindings clash with the ones from Intellij.
Is there a possibility the switch between bindings on the fly ?
Say I'm editing a Java file with Emacs+ bindings and I would like to go to the declaration of the method on the current cursor position:
With the keyboard shortcut available, here is the setup:
I would first switch to Intellij default bindings (using the shortcut in question) and then press Ctrl + B
Go back to Emacs+ bindings to continue editing
You can use View > Quick Switch Scheme ... to switch key mapping bindings.
Here are some screenshots showing this:

how Can I put the ToolWindow in the middle of IntelliJ?

I am working on a plugin on IntelliJ.
ToolWindow on IntelliJ Plugin have a property anchor which we can put our ToolWindow on left/right/bottom of IntelliJ. But I am willing to put a ToolWindow or something like that in the middle of IntelliJ(the editor ToolWindow place), just as the picture shows. How can I do it on IntelliJ?
Or How the editor ToolWindow do like that? I am trying find how IntelliJ do in source code but got nothing.
I would appreciated if any help useful.
The middle area of the IntelliJ user interface is always occupied by editor tabs. An editor tab is not a toolwindow, and it's not possible to place a toolwindow in the middle of the UI.
You can place your own component in an editor tab if you implement the FileEditorProvider interface.

Intellij IdeaVim: access IDE shortcuts without making vim give up control of that shortcut

ctrl-O is used to jump to the previous entry in the jump list.
But in the IDE, according to the documentation, ctrl-O helps you override methods declared in a base class, kind of like ctrl-enter in Eclipse when the cursor is on an empty line.
One can change a setting that will assign the control of ctrl-O to the IDE. That would make vim loose access to that key, and you'd no longer can use it to jump around the jump list.
Is there a special shortcut key, so that the next key is handled by the IDE instead of vim?
You can assign another shortcut to the override methods action via Settings | Keymap while keeping CTRL-O under control of IdeaVim in Settings | Vim Emulation.