Re: Suggestion: numbers for completion menu?

2007-01-24 Thread Nikolai Weibull

On 1/23/07, Marc Weber [EMAIL PROTECTED] wrote:

It would be convinient to get an item from the completion menu faster
than downdown .. or typing more characters.

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

Would it be convinient to add another mapping space for completions?
mnoremap 2 c-i2 ?
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('\ltC-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


Suggestion: numbers for completion menu?

2007-01-23 Thread Marc Weber
It would be convinient to get an item from the completion menu faster
than downdown .. or typing more characters.

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

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

Or is there another easy way to achieve this ?

Marc