Unexpected Intellij Auto Complete Results - java

Hey there basically I'm seeing unexpected auto completion by intellij. I have tried multiple way to get it to work the way I expected it to and can't.
https://www.webmshare.com/play/yAPxo
The first line is what happens when you press tab to auto complete something and the following is when you click it in the menu.
I was wondering if it is possible to change the behavior so when I press it TAB it follows the behavior of the second line.
Thanks.

I came from work, I am glad it worked for you, so I wanted to add it as an answer.
Enter is the key for what you click in the menu to autoComplete. Tab replaces the remaining part, whereas enter just adds the completion into where the caret is. You should be able to change keys for those actions. To change those keys:
Open preferences in Intellij and go to Keymap
Change Choose Lookup Item with whichever key you want to use (it is tab key in your case I presume)

Related

How to have Eclipse intellisense autocomplete member names?

When I type in a method name partially, Eclipse intellisense shows me the list of suggestions, but how do I select one of them using only the keyboard?
I tried pressing the Tab key, the Enter key and the Space bar, but all to no avail. It appears that the only way I can get to select one of the names from the list of suggestions is to use the mouse. This is very irritating.
Is there a keyboard short-cut to selecting a name from the intellisense suggestions?
Type in some part of the expression, use the arrow keys to navigate through the suggestions offered by intellisense. And then hit the Enter key to select the chosen expression, dismiss the pop-ups and have the selected expression appear in the editor in place of your partially typed expression.
Do not hit the tab key before making a selection as that moves focus away from the suggestions window.

IntelliJ autocompletion replacing the subsequent word

I've been using IntelliJ for a while now, but there's always been something that bothers me. Its to do with the autocomplete feature. This gif should be enough to illustrate.
In essence, when typing a word next to another one (that is with no space in between) regardless of the two words or the context, be it keywords or variables, the autocomplete will replace the next word by the one you complete with. I/m surprised that IntelliJ doesn't have a setting for that (at least not that I'm aware of) considering Eclipse does...
Thanks in advance!
This behavior depends on the key that you use to select the item from the completion list. If you press Enter, the selected item is inserted in the code before the following identifier. If you press Tab, the selected item replaces the identifier following the cursor.
If you prefer, you can change the behavior by reassigning keyboard shortcuts for "Choose Lookup Item" and "Choose Lookup Item Replace" under Settings | Keymap.

Eclipse parameter dialog/hint when using functions in code

By default In Eclipse when you use a function or create objects it helps with parameters like this:
But once it's done, it'll never show up again. Is there any way to call this parameter helper on code that's already written when I point the cursor on the method?
The Image I uploaded only appears while writing code.
Ctrl + Shift + Space will do the trick. It is named Context information in Key preferences.
Place the cursor just inside the left parenthesis and press Ctrl+Space (Command+Space on Mac) again; Eclipse will show Content Assist again.
When the mouse cursor is in the paranthesis, click Ctrl+Space. It will pop up menu (content assist). If you enter it, it will show the context information as it was at the beginning.
You can't get place holders again once they disappeared. But you can get content assist help as said by #E-Riz
Check this answer What is Eclipse shortcut key to turn on feature that allows when pressing TAB key, for cursor to go to expected position? and also this What's this box around my function input?
i was looking for the same shortcut and didn't find it ;
now i'm using
*ctrl+Arrows to move between words
*alt+shift+arrows to select the world and replace it
JDT-Codemining is a new project (as of Aug 2018) that supports parameter hints, along with many other features, such as:
General
Show references
Show implementations
Show method parameter names
Show method parameter types
Show end statement
JUnit
Show JUnit status
Show JUnit run
Show JUnit debug
Debugging
Show variable values inline while debugging

Changing behavior of Ctrl+Shift+Left/Right in IntelliJ IDEA like in Eclipse

Hi I'm new to IntelliJ IDEA and got here and there usability issues, because I'm coming from Eclipse.
When I rename a variable and want to mark the second part of it by hitting Ctrl+Shift+Right, the cursor moves to the next word which is outside of the border for renaming and when I type the new name and click Enter, the rename isn't executed for the other usages of the variable. Is there a setting where it's possible to change the behavior of Ctrl+Shift+Left/Right so that the caret moves right after the last character of the variable name?
Second question
When I'm moving the cursor through a variable name with Ctrl+Left/Right the next stop in Eclipse was always before the next upper case letter. Is in Idea also a setting to activate this? This would be very helpful when renaming variables.
What you exactly need is [I have jIdea 12.1]:
Go to settings [Ctrl+Alt+S]
Choose [Editor -> General -> Smartkeys]
Check the [Use "CamelHumps" Words] button
Вуаля!
Ctrl+Alt+S and select Keymap from settings, you can change what you want it to there.
But I would suggest using the autocomplete/intellitext features of IntelliJ and the refactoring tool, without manually navigating through variable names - they normally get it right first time.

Can you rebind the 'next menu element' key in Eclipse?

I use eclipse and when I do code completion, I'd really like to keep my hands on the home row and push "CTRL-N" for the next code completion suggestion, and "CTRL-P" for the previous one. I'm not seeing anything that looks like what I need in the Preferences > General > Keys menu. Anyone have any ideas?
As said in the comment above:
I figured out from that that the bindings I wanted were "Line Up" and "Line Down".

Categories

Resources