On 1/23/07, Marc Weber <[EMAIL PROTECTED]> 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 ?

I've already mentioned this here:

http://thread.gmane.org/gmane.editors.vim.devel/15344/focus=15344

Here's the mappings:

for digit in [1, 2, 3, 4, 5, 6, 8, 9]
 execute 'inoremap <silent> ' . digit . ' <C-R>=pumvisible() ? "' .
       \ repeat('\<lt>C-N>', digit) . '" : "' . digit . '"<CR>'
endfor

However, what I also mention there is that the completion menu
flickers like mad if you use this.  It shouldn't be redrawn quite as
often as it currently is, and not as much of it either.

 nikolai

Reply via email to