Is there any way to make IntelliJ IDEA file context menu searchable? - intellij-idea

I love IntelliJ IDEA, because it's conveniences of keyboard input and quick search, you can search almost everywhere, just input directly in the view and popups, like it's quick outline, search files, project struct and so on. It's fuzzy search is quick and powerful.
Context menu so powerful and frequently used, but there's no quick search. And I get used to keyboard input and ideavim plugin now, it's a good plugin. but the context menu makes me feeling so bad.
So, is there any way to do that? Making it searchable like quick fix, quick outline.

There is a related feature request, feel free to vote.
Right now you can create your own quick lists with the actions you need. Quick lists have the shortcuts by default.

Related

How to implement a non-intrusive UI element in Intellij editor

I would like to implement something similar to breakpoint or lightbulb notifications in my IntelliJ plugin. Up until now I've been using Inlay which is great but they shift the text next to them. I need something similar that doesn't impact text layout and can still receive user clicks.
It would also be great if I can place such content in the gutter area like real breakpoints.
Unfortunately these things are very hard to search for as the common keywords popup up and cloud the search results.
It seems that what I was looking for are gutter icons: https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000164564-Insert-Gutter-icon

Is there a way to make IDEs (IntelliJ, PyCharm, VS Code) have fewer popups but still have completion?

I learned to program 30 years ago with Emacs. I'm starting to learn moderns IDEs such as "IntelliJ IDEA", "PyCharm", and "VS Code".
It's hard to adjust to how visually "busy" they are, with constant pop-up menus appearing every character I type.
Of course I want to be able to get suggestions for completion or parameter hints or other popups when necessary. I just don't want them to appear by default.
Some people are asking why popups are annoying. The main problem is that popups cover code above or below where I'm typing.
Emacs has completion. But it doesn't need a popup. For instance, dynamic completion works just fine 90% of the time, even though it's not smart enough to parse syntax or look up function and method definitions.
So I'd like to know if there are settings in JetBrains or VS Code IDE's that would help.
I'm aware of two kinds of popups.
(1) An offer to complete my typing, which appears below.
(2) Annotation of argument names and definitions, which appears above.
There may be other popups as well.
I'm aware that a popup can be dismissed with ESC. But often they just come back the moment you type another character.
What would be great is if the popup would not appear by default, but I could cause it to appear with a single keystroke. Or I could dismiss it and it would stay dismissed.
For PyCharm You can also try writing in "Disctraction Free Mode"
View -> Enter Distraction Free Mode
Which should give you a little screen of calm which will feel a lot more like emacs to you.
It's possible to adjust the behaviour via "Settings".
In IntelliJ IDEA, goto Menu File --> Settings ... , then navigate to Editor --> General --> Code Completion , or type something in the search field (upper left).
Perhaps you find more settings when you browse through Settings dialog.
To be honest, I didn't make a lot of tests with these settings, because I find the helper popups very useful.
Another option to get rid of some "noise" is to adjust settings for displaying parameter names in the code editor.
I switched this off completely.
Go to Settings --> Editor --> General --> Appearance
The new IDEs are really busy looking for libraries, checking/auto closing balanced parentheses, indenting, surrounding methods/functions/procedures/classes as you type. Sometimes I feel the same, but these IDEs are not plain text editors anymore. Every key stroke triggers something which can be time consuming. When the project gets larger and when it has lots of libraries, it can get even slower. Some IDEs have options to turn some of these options off. Every feature turned off will have some positive effect on responsiveness to some degree
But I think, instead of turning these features off, the best way to have these features on a responsive modern IDE is to use a computer with a fast cpu, an ssd drive and sufficient memory.

What is the principle by which keyboard shortcuts selected in IntelliJ IDEA?

There are lots of useful functions of Intellij IDEA and for many of them there are keyboard shortcuts.
But remembering shortcuts may be difficult, at least for me.
Are there some consistent guiding principles by which these shortcuts were selected by designers? I believe learning such principles would be helpful to memorize shortcuts itself.
I think that the closest answer you're going to get is "it depends". Some shortcuts are obviously chosen, because the keybinding describes what the shortcut does, for example ⌘+O means open, not only in IntelliJ but in many places throughout OS X.
Some shortcuts probably don't have any kind of such semantic meaning, such as Alt+Enter and are chosen because they are very frequently used and the placement of the keys relative to each other is comfortable.
Other keyboard shortcuts with similar purpose have the same starting sequence of keys. For instance the extract refactoring shortcuts, which are as follows:
⌘+Alt+M - extract method
⌘+Alt+C - extract constant
⌘+Alt+V - extract variable
⌘+Alt+F - extract field
⌘+Alt+P - extract parameter
So in such case you only need to remember that if you want to extract something, you press ⌘+Alt and the first letter of what you want to extract.
That being said, I don't believe that the way to learning the keybindings is memorizing them, but using them. If you use one keybinding multiple times, over the time you will memorize it. You can help this process for instance by locating the action you want to perform in the menu, but instead of clicking it look at the keyboard shortcut next to it and press it. Or find the action using ⌘+Shift+A, look at the shortcut and use it.
There are even plugins, which can help you with this, for instance Key Promoter which you can install via Settings/Plugins/Browse Repositories. This plugin shows you shortcut you can use when you invoke some actions by clicking it in menu, etc. It also shows you how many times you've used this action in such a way instead of using the corresponding shortcut.

IntelliJ-IDEA Eclipse Ctrl+O equivalent that is better than Alt+7

In Eclipse I could hit Ctrl+O and get a popup which I could use to get an overview of everything in the current class, pick an entry, and jump to it.
In idea, there is Alt+7, but I have a few issues with it. First, the keyboard doesn't seem to put its focus there. I have to take my hand off the keyboard and use the mouse to place the focus on the Structure dock.
I also don't like how it's taking up real estate. I don't want to change how things are laid out if I want to see the structure. I would like a more non-invasive popup, and handier and snappier.
Is there another feature that gives me quick access in the form of a popup preferably, like Ctrl+O provides in Eclipse?
Another nice feature would be to be able to use the J and K keys to move up and down the selection, instead of having to use the cursor keys. I'm using IdeaVim, so the normal workflow when editing files, is that both hands stay in a touch-type position. It would be nice if I can use the various navigation features also using vim keys...
Perhaps there is a way to enable this, that I haven't discovered yet?
IntelliJ equivalent of Eclipse's CTRL+O is CTRL+F12 (⌘+F12 on Mac), which will give you more or less the same pop-up as in Eclipse. But I'm not sure if it can be navigated using j and k keys.
More details can be found in the IntelliJ help.

How can I put an IEditorPart in a modal dialog?

(I'm something of an Eclipse newbie, so apologise for any dumbness on my part...)
I have a number of editors (derived from IEditorPart) in my RCP app, and a requirement has arisen that one particular editor needs to be also available in a modal dialog box (along with some extra controls) opened by one of the other editor classes. The editor to be embedded consists of the main viewer control, toolbar, and a couple of dozen helper classes (label providers, comparators, etc).
The options before me appear to be:
Find a way to put an editor area, IWorkbenchWindow-style, into a (JFace or SWT) Dialog.
Not had much luck searching for how to do this
Create a new WorkBenchWindow with a Perspective that just the editor area visible, and no views. Make this modal.
On trying this, the new window seemed to inherit things (menus etc) from its parent window.
Refactor the editor in question so all of it now resides on a single control, then embed this control in both the editor and the dialog.
Potentially time-consuming, given the number of places the helper classes refer back to the main editor object.
If it turns out that this is a truly perverse and anti-idiomatic thing to want to do, in Eclipse terms, can you suggest a wiser course of action?
Thanks
EditorParts are meant to be inside workbenchwindows. There is a lot of code that depends on this behaviour. So I would suggest not to do (1). If the result is acceptable (a workbench window, which is modal), the easier way is to hang on to (2).