MXML- first look up item selection

Hello,

I'm trying to setup the keymap preferences to match the experience on Flash Builder and I'mosty there. There is a certain mapping that doesnt seem to work though. I have mapped the enter key to always select the first lookup item on the code completion.
It works great in ActionScript but the MXML code completion does not select automatically the first item in the list so pressing enter will insert a new line in the file.

Anyone that knows a workaround for this?


Thanks.

4 comments
Comment actions Permalink

If you have called code completion explicitly (e.g. by pressing Ctrl+Space) then Enter will work as you expect.
If code completion popup is shown automatically (and thus is not focused) then you have 3 ways to choose first suggested variant:
- press Ctrl+Enter (BTW this hint is shown in the popup)
- press Down arrow (to focus popup) and then press Enter
- call code completion explicitly (Ctrl+Space) and press Enter

Also nothe that Enter is not the only key to select variant from completion list. Tab key inserts variant overriding currently written identifier (if any). Also dot, comma, for booleans - ! sign and some others work.

0
Comment actions Permalink

In my case the popup is shown automatically. I know about the solutions you have suggested but I was looking for a way to have the first item on the list focused automatically so I can press enter and select it. In actionscript this is happening by default, the popup is focusing on the first available item so I thought that mxml would do the same.

0
Comment actions Permalink

Ok,
to focus autopopup by default please set 'Preselect the first suggestion' option to 'Always' at Settings | Editor | Code Completion.

0
Comment actions Permalink

Thanks a lot. This is exactly what I was looking for. :)

0

Please sign in to leave a comment.