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

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.

Related

How to keep IntelliSense Complete Word option off?

IntelliSense has a mode where if you hit the spacebar, it will automatically type out the suggested auto-complete word. In order to prevent this from happening, you can hit the Escape key before pressing Space. This will close the autocomplete popup, so that the suggested word is not automatically typed.
I prefer the alternative setting, where I actually have to hit the Enter key to accept the suggested autocompletion. If I just type Space, I want a space to follow the characters that I actually typed.
I know that I can toggle between the undesired mode and the second mode I describe, which I do want. To do this, I click Edit -> IntelliSence -> Toggle Completion Mode.
My problem is that this setting never sticks. It constantly reverts to the wrong mode. I'm not sure exactly when it's changing, but it seems to revert back several times a day. If I change this for one Solution, it won't apply to my other Solutions. Even if I apply it to a solution, close VS, reopen, and start working again, it will have reverted.
Does this happen to everyone else, or is this unique to me? Is there some global setting that forces this feature to stay off always? Do I have a corrupted file somewhere that's causing this?
No, this is normal behavior and this setting behaves like what you described in the previous VS versions.
However, thanks to those members who is reporting this issue and Microsoft has fixed this behavior in the latest VS2019 version.
Since VS2015 is not supported by Microsoft so far, so this behavior cannot be fixed on VS2015 and I suggest you could install the latest VS2019 Community and get what you want.
Once you click the Toggle Completion Mode under Edit-->Intellisense, no matter you close VS, create a new project or a solution, use other c# file editor, it will never revert back.

Tooltip doesn't let me type text when it is appeared. IDEA's editor

I am working with Itellij IDEA (2017.2.4). I am not sure whether the reason is new version of IDEA, but I started to face it after new version installed.
When I type some code in editor and Tooltip is shown (it can be inspection or just parameters of method shown ect.) I cannot type new symbols until pressing ESCAPE button, it is not useful for me. Before updating the IDEA there was behavior when user types new code, tooltip is hidden without ESCAPE pressing. It was made hidden by any key pressed.
Actually maybe I just change some setting property unconsciously, if yes - what is the property needed to be restored to default?
How to make it hidden not by ESCAPE but by any button?
In next image I pictured the moment when only ESCAPE key can be pressed.
I'm not able to reproduce the issue, even when I use v2017.2.4 on windows. The behavior should be that you can still type even when the tooltip is present:
I can't think of anything in terms of settings that could cause this issue. If it's just the "parameter info" tooltip that is causing the issue, you can disable it (or just increase the delay time) from automatically popping up via the setting: Settings > Editor > Code Completion > "Parameter Info" > "Autopopup" You can then manually open it via the Parameter Info Action via Ctrl+P / ⌘P. The setting #Maciej-Białorucki mentioned will effect the time before other tooltips open. Setting to a high value might help if other tooltips are causing issues.
Personally, I find the auto popup useful. To troubleshoot why this is causing issues, I'd recommend trying the following:
Upgrade to v 2017.2.6 which was released yesterday. While I personally can't reproduce it, and I'm not seeing anything about it in the 2017.2.5 Release Notes nor the 2017.2.6 Release Notes, it can't hurt to try and upgrade.
Disable all third party plugins and restart IDEA. See if the issue persists. In my 14 years of using IDEA and helping people with it on the forums, I've seen 3rd party plugins having bugs that cause other parts of IDEA to misbehave. Since you recently upgraded, it's possible a 3rd party plugin is having a compatibility issue with the new version. If the disabling them solves it, use a binary search to as you re-enable the plugins to track down the culprit and then report the bug to the plugin's developer.
See if it happens in other projects. If not there may be something wrong with the project's configuration. (A long shot. But worth checking out)
As another long shot, you can try invalidating the caches and then restarting IDEA via File > Invalidate Caches / Restart... I have on occasion over the years seen a corrupted index file or cache cause strange behavior.
If none of the above work, I suggest opening a bug report with JetBrains at: https://youtrack.jetbrains.com
Check Tooltip initial delay(ms) option under Appearance in Idea settings.
As I divined there was a property in settings that influences to the behavior described in a question. So to continue writing code without pressing ESCAPE key you must uncheck the following property:
Menu page Settings -> Appearance & Behavior -> System Settings
Checkbox Accessibility -> Support screen readers (requires start)
(for more details see the link)

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.

Multiple "right margins" or guides in PHPStorm

PHPStorm has a vertical line on what they call the "right margin" which is set by default to 120 characters or columns...
Given that PSR standards state There MUST NOT be a hard limit on line length; the soft limit MUST be 120 characters; lines SHOULD be 80 characters or less., it'd be nice if I could get another visual indicator at the 80 character mark...
I'm well aware that it says what line/column you're on in the status bar, but I typically hide most panels (status bar included) while coding.
Therefore, is there a way (feature or plugin) that would allow me to add a 2nd vertical line to indicate the 80th column?
It is not currently possible .. and no plugin comes into my mind.
https://youtrack.jetbrains.com/issue/IDEA-99875 -- star/vote/comment to get notified on progress.
P.S. Considering that this is rather PHP/Python specific (other languages do not care about this) .. I would not expect JB to have it implemented in nearest future...
I suggest the following workaround, it works for me on PhpStorm 9.0:
Open Settings page (usually Ctrl+Alt+S), go to Plugins -> Browse Repositories
Find and install BackgroundImage plugin
Restart IDE, it may output an error, something like "unknown protocol d" - don't worry, go forth
Make an image with height=1px, and width=(desired width of additional margin). Give it, say, white background and paint one rightmost pixel to say, black. I took a screenshot of an editor and cropped it in PS, to avoid annoying search and adjustment of the image width. Every change of background image requires to restart PhpStorm.
Open Settings again, goto Other settings -> BackgroundImage
Set Enabled checkbox, browse your created image, and check the FileSystem radio button
Restart IDE again and change the margin and you will get two margins
The image is left-aligned, so when you resize an editor on x-axis (move the splitter between Editor and Project View or File System View, etc.), the margin will remain truthy.
Some side-effects - it appears also on console window, event log, perhaps somewhere else.
If the plugin doesn't work, check out this page (there said that most JetBrains plugins should work on all products on IntelliJ Platform, and some workaround if they does not): http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
ADDED: Doesn't work with scaling an editor (Ctrl + MouseWheel) - the scale of the image (fake margin), remains the same and the margin becomes not truthy.
In the latest PHPStorm, this is now possible. This would be PHPStorm 2017.3. The instructions on the ticket mentioned in the accepted answer explains it quite well:
Will be available in the next EAP build. You can set it up at
Settings|Editor|Code Style|Visual guides for all languages or on
"Wrapping and Braces" tab for a specific language ("Other" tab for
XML/HTML). You can change the visual indent guide color at
Settings|Editor|Color Scheme|General|Guides|Visual guides. Please
submit separate reports if you find any problems.
I personally found the setting in Settings|Editor|Code Style|PHP|Wrapping and Braces|Visual guides. It should be there for every language.

Turn off Intellij signature popup

In IntelliJ 12, how do I make the popup stop...popping up when I hold Ctrl while hovering over a field/method with the mouse? (see picture)
That is the "Brief Info" action (or at least that is what it is called in the Keymap reference.) To the best of my knowledge (i.e. 10+ years of daily IDEA use including all beta/EAP builds), there is no way to turn it off. Searching the settings for either "Brief Info" or "Info" does not show any pertinent setting. Likewise, searching key mappings for the same does not reveal a mapping. In fact in the keymap settings, you can only map mouse clicks, not mouse pointing (i.e. hovering). You can submit a feature request asking for a setting to disable this feature.
Just put of curiosity, why do you want to disable it? I guess I would never see a case where one would Ctrl+MousePoint unless they wanted to see this. The only case I can think of would be if you disliked it popping up when you go to Ctrl+Click on a symbol. If it is the latter, note that you can use Ctrl+B in place of Ctrl+MousePoint
Try turning off the "autopop" options under /Settings/IDE Settings/Editor/Code Completion.