How to disable help in IntelliJ Idea? - intellij-idea

I have mapped 'tilde' key (under escape on mac) to autocomplete, I just find it easier that way. At times I instead hit F1 accidentally and the IntellJ help pops up. Is there a way that I can disable F1 from activating help?

Yes. Press Ctrl+Alt+S and go to the Keymap tab in settings. Then find the "Context Help" node in All Actions/Other/Context help, and remove the shortcut.
You can look for other bound shortcuts in the future (by the key used to activate them) using the "filter" icon to the right of the search box.

Related

IntelliJ IDEA - Key board right click doesn't work

I am using IntelliJ IDEA Ultimate v 13.1, and I am fond of using key board short cuts, rarely use mouse. I am relatively new to this IDE as earlier I always worked on eclipse.
My question is about performing right click operations by pressing the right click key on key board (usually found near the right side Ctrl key on external key boards). The problem is when I press this key, nothing happens but when I click the mouse right click and things just happen. This is applicable on editor, project explorer and I guess everywhere in the IDE.
Is there a switch I should turn on and it will work or any other way to get key board right click work in IDEA? Thanks very much for your responses.
I know it is an old question, but it popped up as 1st result when I searched for my issue, and I figured it out with some of the context in Ketan#'s answer.
Fix:
Go to File -> Settings -> Keymap
Search for "Show Context Menu"
Add a new keyboard shortcut. When prompted, press the "right click" (aka "context menu") key.
For me, It simply works after just restart the IntelliJ IDE
Sometimes accidents just happen for good! This one falls in that category :)
Somehow IDEA was unable to load any of my projects, and I thought of deleting '.IntelliJIdea13' directory from my user directory. Initially I didn't change my keymap (shortcuts) to Eclipse and right click just works fine.
In any case the problem is there for IntelliJ to fix. They should allow right click from keyboard to work even when shortscuts are mapped to Eclipse style.
I tried to change the shortcuts to Eclipse and keyboard right click stopped working. When I change it to default, it starts working.
If you was installed it with jetbrains toolbox you can't made it easily.
I made a script written in php but you could adapt it to other languages:
https://gist.github.com/firegore2/0ba76d74f070b07eda5a12f3f24ba054

Shortcuts in IntelliJ

I have changed the IDE I'm working with form Netbeans to IntelliJ.
My question right now is, why do the shortcuts don't work.
I want to comment out with "crtl+shift+/" but nothing happens. Is there any bug? Can I import the shortcuts form Netbeans?
Thx for your help.
Go to "File" -> "Settings" -> "Keymap" and chose the keymap that you want to use from the "Keymaps" dropdown.
If you do not want to change your keymap or have to work on the machine of somebody else you can use Ctrl+Numpad ÷ and Ctrl+Shift+÷.
In case you have a keyboard without a numpad it might be possible to emulate the numpad on your keyboard (often using the Fn-key).
See also

Cycle through autocomplete suggestions without arrows

I'm really impressed with the autocomplete feature of the IntelliJ IDE so far.
What I'd like to do, is cycle through the autocomplete suggestions I get when hitting Ctrl + Space without using the arrow keys (↑, ↓).
The reason for this is that I prefer to keep my fingers on the home row (I'm using IntelliJ's Vim emulator additionally).
For example, how would I select sortThis instead of sorted without using the arrow keys or the mouse?
Peter Gromov's answer brought me to a satisfying solution:
In IntelliJ's settings, for Keymap → Editor Actions → Down I set a custom shortcut: Ctrl + J.
This way I can cycle forward through the suggestions.
Setting a shortcut for Down with Selection or Scroll Line Down in the IdeaVim-specific shortcuts did not affect the selection of autocomplete suggestions though.
The answer here: https://stackoverflow.com/a/9713306/2370679 led me to discover that Ctrl+n & Ctrl+p allow navigation of the auto-complete options without having to modify any settings
For macOS the IDE will give a hint that "^↑ and ^↓ will move caret up and down in the editor". These clearly do not work.
There are a few extra steps that are needed after following #matthias-braun's solution.
Here is the full list of step that I use:
Go to Preferences -> Keymap
Expand Editor Actions (not Plug-ins -> IdeaVim)
Select Down
Click the pencil icon or right-click
Select Add Keyboard Shortcut
Press the shortcut (I use ^N)*
Repeat for 3-6 for Up (I use ^P)
Click Ok**
Go to Preferences -> Other Settings -> Vim Emulation
In the drop-down under the Handler column for the row containing Down, select Vim***
Do the same thing for Up
* If you are warned about the key binding already existing then remove it. You can always reset back to the defaults by clicking the little cog icon up the very top to the right of the drop-down menu.
** The Vim Emulation doesn't seem to be populated correctly until you reopen the Preferences.
*** I'm not sure why the Handler should be Vim. This seems backwards to me but it works.
If you're able to scroll up/down in editor with some IdeaVIM-specific shortcuts, they should also work in the completion list.
In this particular case, I'd just type another "t" so that "sortThis" becomes selected (and the only) variant.
I have done the same thing with mapping the arrows but in a more logical way:
I mapped them that when I press 'Alt' 'J' is left, 'L' is right, 'I' is up, and 'k' is down. that way I can have easy access to the arrows while my fingers are on the home row and I don't need to move them nearly as much...
I'm posting it just so people who search it on google can have that idea.

XCode shortcut key to dismiss warning/error highlights?

Is there a shortcut key to dismiss the lines that get highlighted yellow and red for warnings and errors, instead of having to click one by one on the symbols in the gutter?
I have tried searching but this particular nugget of wisdom isn't easy to find, if indeed it's out there.
Thanks.
The shortcut you're looking for is Control-Command-M which corresponds to Issues->Show All Issues in Xcode's Key Bindings settings menu. You can change this shortcut to what ever you'd like, and it will toggle wether or not error messages will be visible on screen.
I don't know if you already tried that or if that's what you're searching, but there is the menu "Editor" -> "Issues" -> "Hide all issues" command that maybe can be useful

How to close a file in Intellij using a keyboard shortcut?

I know this is a simplistic question; but I've been using IntelliJ for months now, and can't find this simple feature.
Any idea? Thank you.
Idiot me. CMD-F4 or, as mentioned before, CTRL-F4.
Thank you all. I'll just bury myself now :)
hmm you can't because there is no default key binding for that, at least on OSX, however you can go here and define one:
The standard tip if you don't know how to do something in Idea is "Find Action..." (ctrl+shift+A in Windows) then type what you want to do, in this case close.
You will get a lot of different "close" actions and simply "Close" (ctrl+F4 in Windows) will be one of them.
You can also set a custom key combination in the settings menu
Click on File > Settings and select Keymap from the menu on the left, then scroll down to the Other section and set your preferred key combination for Close Active Editor:
When you double-click on Close Active Editor, a menu pops up allowing you to set a key combination, a mouse gesture, or even an abbreviation for the action. If the shortcut is already set somewhere else (as in my case with Ctrl-W) you'll get a notification and won't be able to set the shortcut until you remove the other one.
As with Matt Ball, I don't use IntelliJ but may also be CTRL+F4...
For MAC user, Cmd-W will close the active tab (file).
On Mac, you might like to use CMD + W, as this is the conventional shortcut for closing things e.g. Tabs in Chrome.
But by default this is usually associated with highlighting the current cursor block, so instead I use CTRL + W, rather than re-assigning.
e.g. (bottom right)
Also works for other IntelliJ IDEs, like WebStorm, etc.
IDEA->File->Setting->Search for "Close Active Editor".
Click on 'Add Keyboard Shortcut' -> Change it to "Ctrl+W". (Overwrite).
BOOM! you are universal now!
I'm on version 2020.4 and this has changed to Ctrl+4