Marc Weber wrote:
It would be convinient to get an item from the completion menu faster
than <down><down> .. or typing more characters.

What do you think of prepending each item with a number and add a
key-mapping
<c-i><idx> to get the idxth item?
so <c-i>4 would select the 4th.

Would it be convinient to add another mapping space for completions?
mnoremap 2 <c-i>2 ?
m = omni completion _m_enu ?

Or is there another easy way to achieve this ?

Marc

Marc,

Look up (in :he) "omnifunc". For PHP, for example, it is set to phpcomplete#CompletePHP. That function returns the list of matches. So, if you remap <c-i>1 through <c-i>9 to your own custom functions, you should be able to figure out a way of getting what you are looking for I think. Or even better, you can look in the appropriate plugin file to get direct access to the autocomplete list (e.g. vim70/autoload/phpcomplete.vim).

Hope this helps.

-Robert

Reply via email to