Inconsistencies in Completion/Surround/Templates/Goto popup menus.
Hello,
I've been using Intellij IDEA the past month, and in the process of learning all the completion/template/goto features, I've noticed some bugs and inconsistencies.
Supported Keys for each Popup *
Basic Completion Popup (CTRL+SPACE)
Cycle Choices: Editor->Down, Editor->Up (respects keymap settings)
Select Choice: ENTER SPACE (also adds a space char after)
Exits Mode: TAB RIGHT/LEFT_ARROW ESCAPE BACKSPACE (emits backspace also) DELETE (emits
backspace also)
Resets Mode: CTRL+SPACE (moves choice back to default)
_ SmartType Completion Popup (CTRLSHIFTSPACE)_
Same as Basic Completion.
Intention Popup (ALT+ENTER)
Cycle Choices: UP/DOWN_ARROW (doesn't respect Editor->Down,Editor->Up settings)
Select Choice: ALT+ENTER, ENTER
Exits Mode: ESCAPE
Turns Current Intention On/Off: SPACE
Surround With Popup (CTRLALTT)
Cycle Choices: UP/DOWN_ARROW (doesn't respect Editor->Down,Editor->Up settings)
Select Choice: ENTER 1-A (selects individual items)
Exits Mode: ESCAPE
Generate Popup (Code->Generate)
Cycle Choices: UP/DOWN_ARROW (doesn't respect Editor->Down,Editor->Up settings)
Select Choice: ENTER
Exits Mode: ESCAPE
Live Templates Popup (CTRL+J)
Cycle Choices: Editor->Down, Editor->Up (respects keymap settings)
Select Choice: ENTER SPACE
Exits Mode: TAB RIGHT/LEFT_ARROW ESCAPE BACKSPACE (emits backspace also) DELETE (deletes char
also)
Goto Class (Goto->Class,ALTSHIFTG)
Cycle Choices: UP/DOWN_ARROW (doesn't respect Editor->Down,Editor->Up settings)
Select Choice: ENTER
Exits Mode: ESCAPE
Incremental Search (Search->Incremntal Search,CTRL+S)
Cycle Choices: Editor->Down, Editor->Up (respects keymap settings).
Exits Mode: TAB RIGHT/LEFT_ARROW ESCAPE DELETE (deletes char also)
Summary of Inconsistencies *
+ Intention Popup, Surround with Popup, Generate Popup, Goto Class doesn't respect
the Editor->Down,Editor->Up settings. They only accept UP/DOWN_ARROW. For people
using Emacs keymap CTRLN/CTRLP doesn't work.
+ Intention Popup, Surround with Popup, Generate Popup, Goto Class only exit on
ESCAPE while Basic/SmartType Completion, Live Templates exit on TAB RIGHT/LEFT_ARROW ESCAPE
BACKSPACE DELETE.
+ Basic/SmartType Completion and Live Templates Popups let you press SPACE to
accept the choice, while others do not.
+ Incremental Search doesn't respect to the Appearance->Cyclic scrolling in lists, while others do.
Bugs / Quirks *
+ I need to hit ESCAPE twice to cancel. This is because I am using
Emacs keymap and I use ESCAPE as a prefix key. So, the first time I hit
ESCAPE it says "Prefix key pressed.." in the status bar; Then, the second
ESCAPE cancels the mode.
+ If you have Completion->Code Completion->Autocomplete when only one choice turned
on, you will notice different behaviors when there is one choice verus multiple choices.
For example, when completing a Class Name:
// [popup displayed, choose Integer, press SPACE] Integer | ]]>
Integer| ]]>
When completing a method name, there is also a difference.
// [popup displayed, choose toHexString, press SPACE] Integer.toHexString(|) ]]>
Integer.toHexString(| ]]>
You can also see a difference in SmartType Completion:
Dimension b = a;| ]]>
// [popup displayed, select a, press SPACE] Dimension c = a | ]]>
+ I think it is odd that some keys that cancel/select also perform the EditorAction
while others don't. Sometimes, a key performs EditorAction in one popup but not another.
For Example:
ENTER selects, and nothing else in all popups.
SPACE selects. In some popups (e.g. Basic/SmartType Completion), it also outputs a space
character when completing class/field name. No space is output when completing a method name.
In Live Templates popup, SPACE selects, but no SPACE is output.
In the popups which allow BACKSPACE and DELETE to cancel the popup, the BACKSPACE and DELETE
also perform BackSpaceEditorAction and DeleteEditorAction.
Suggested Fixes*
+ All popups should use the Editor->Down,Editor->Up settings for UP / DOWN.
+ All popups should allow ESCAPE TAB RIGHT_ARROW, LEFT_ARROW to cancel the
popup. For RIGHT_ARROW and LEFT_ARROW, it should also use any additional
keybindings for Editor->Right and Editor->Left.
+ All popups should accept SPACE to select choice in addition to ENTER.
+ Using SPACE to select a choice shold not output a SPACE character.
+ Using BACKSPACE/DELETE to cancel the popup menu should not perform a BackSpace
or Delete editor action.
+ Incremental Search should respect setting Appearance->Cyclic scrolling in lists.
+ For people that use ESCAPE as a prefix to a keybinding (e.g. Emacs keymap),
INTELLIJ shouldn't say "Prefix Key Pressed.." when you press ESCAPE to cancel the
popup and force you to hit ESCAPE again. In the special popup mode, the first
ESCAPE should immediately cancel.
+ If you have Completion->Code Completion->Autocomplete when only one choice turned
on, you should get the same result whether it was one choice that was autocompleted,
or you had to select the choice from the popup menu.
+ Code Completion for methods should respect the Editor->Insert pair bracket
Incremental Search Feature Requests *
The Incremental Search could use alot of improvements. I found the Emacs Search to
be much easier to use. For the following, keep in mind I have Incremental Search bound
to <CTRL+S> key.
+ Pressing CTRL+S while searching should advance to the next match.
+ At the last match, pressing CTRL+S again should give an indication that this is
the last match. Pressing CTRL+S again should wrap to the top.
+ When first pressing CTRL+S, when it prompts you for the text to search for, if
your press CTRL+S again, it should use the last search text. This is very useful when
you need to make a change at every match (and search and replace is not sufficient).
You need to keep pressing CTRL+S, type in search text, exit search, edit code, then
repeat.
+ Emacs design is better because you press CTRLS to start searching forward and CTRLR
to start searching backward. Anytime while in search mode, you can reverse the direction by pressing CTRLS or CTRLR. It is simpler to press CTRLS to start searching, and then just keep pressing CTRLS to goto next match. In IntelliJ, I have to press CTRLS, then DOWN_ARROW or CTRLN. Also, in IntelliJ, there is no way to start with a reverse incremental search. Also, with Emacs design, pressing any Arrow key cancels the search, wheras with Intellij, only the LEFT/RIGHT_ARROW keys cancel the search.
Please sign in to leave a comment.
Search to
Search bound
>
this is
for, if
useful when
sufficient).
code, then
forward and CTRL+R
the direction by pressing CTRLS or CTRLR. It is simpler to press CTRL+S
to start searching, and then just keep pressing CTRL+S to goto next match.
In IntelliJ, I have to press CTRLS, then DOWN_ARROW or CTRLN. Also, in
IntelliJ, there is no way to start with a reverse incremental search. Also,
with Emacs design, pressing any Arrow key cancels the search, wheras with
Intellij, only the LEFT/RIGHT_ARROW keys cancel the search.
Don't forget the ability to "eat" a word at a time with Ctrl-W. This means
that with Ctrl-W you can add to the search string everything from the
current caret position to the end of the current word. That tends to make
incremental search a lot faster and very contextual.
Jacques