Re: some problem with vim7f Beta

2006-04-26 Thread Martin Stubenschrott
On Wed, Apr 26, 2006 at 10:35:30AM +0800, Linsong wrote:

 My main point is: I don't want to select entry in the completion menu by 
 pressing CTRL-N or CTRL-P, instead, I want to input enough characters to 
 make correct entry  become the first entry and it is highlighted, then I 
 can use CTRL-Y(yes, I have mapped Enter to CTRL-Y since I am tempted 
 to use Enter) to confirm the completion.

Then just :inoremap C-Y C-NC-Y 
That should should do what you expect now (untested).

I really disliked old behavior, and think the current completion with
'longest' and ctrl-n is what it should behave like since it's more
logical as you only need c-xc-o and c-n and not yet another key like
c-y.


Re: some problem with vim7f Beta

2006-04-26 Thread Linsong

Martin Stubenschrott wrote:


On Wed, Apr 26, 2006 at 10:35:30AM +0800, Linsong wrote:

 

My main point is: I don't want to select entry in the completion menu by 
pressing CTRL-N or CTRL-P, instead, I want to input enough characters to 
make correct entry  become the first entry and it is highlighted, then I 
can use CTRL-Y(yes, I have mapped Enter to CTRL-Y since I am tempted 
to use Enter) to confirm the completion.
   



Then just :inoremap C-Y C-NC-Y 
That should should do what you expect now (untested).
 


Thanks, martin, it works well.


I really disliked old behavior, and think the current completion with
'longest' and ctrl-n is what it should behave like since it's more
logical as you only need c-xc-o and c-n and not yet another key like
c-y.
 

But I am still not very clear why the first entry in the menu is not 
highlighted? Is it not reasonable?  I don't get any point that 
highlighting the first entry will make the behavior unreasonable. I 
think there shoud be an very good reason and I really want to know. 
Anyone can give some hints?  :)


Thanks a lot!

BR
Vincent







Re: some problem with vim7f Beta

2006-04-26 Thread Bram Moolenaar

Vincent Linsong wrote:

 This is by design.  Some people mentioned that when using the longest
 common string the first entry should not be selected.  Now you can use
 CTRL-N to select the first entry.  Previously you would need to do
 CTRL-N CTRL-P to get the first entry.
 
I use the omnicompletion like this:
I set completeopt=menu,preview,longest . Now consider I input some 
 characters of a function's name, for example, the function's name is 
 'helloWorld' and I input 'hel'. I am not glad to remember the exact 
 function name, so I invoke omnicompletion by C-XC-O, then I know 
 what is the exact name of the function, instead of press C-N or C-P 
 multiple times to select it from the menu, I choose to input more 
 characters and when function's name becomes the top entry on the menu, I 
 will press C-Y to accept it. I think this way is very convenient and I 
 know many intelligence like tools works in this way.
If others have enough reason to change the behavior, would you like 
 to add a new option to make two ways work ?  Thanks a lot!
 
 I think the current behavior is best for most people.  For you, instead
 of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
 stops completion.

 If I press CTRL-N, then what I inputed will be replaced with the first 
 entry of the completion menu, but that is not what I want.

I don't get it.  You type characters until the function you were looking
for is the first match.  Then CTRL-N will select that match and you're
done.

There is a conflict between saying that the top entry of the menu is the
one you want and CTRL-N not getting what you want.

-- 
A poem:read aloud:

 !*''#   Waka waka bang splat tick tick hash,
^`$$- Caret quote back-tick dollar dollar dash,
[EMAIL PROTECTED] Bang splat equal at dollar under-score,
%* ~#4   Percent splat waka waka tilde number four,
[]../ Ampersand bracket bracket dot dot slash,
|{,,SYSTEM HALTED  Vertical-bar curly-bracket comma comma CRASH.

Fred Bremmer and Steve Kroese (Calvin College  Seminary of Grand Rapids, MI.)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: some problem with vim7f Beta

2006-04-26 Thread Ilya

Linsong wrote:

Martin Stubenschrott wrote:

But I am still not very clear why the first entry in the menu is not 
highlighted? Is it not reasonable?  I don't get any point that 
highlighting the first entry will make the behavior unreasonable. I 
think there shoud be an very good reason and I really want to know. 
Anyone can give some hints?  :)
I think, that you are saying that you want to highlight entry that is 
not inserted into buffer.  And Bram and others, assume that if entry is 
highlighted than it means that it is inserted.  That's why C-N 
highlights entry - because it inserts it into buffer.


Re: some problem with vim7f Beta

2006-04-26 Thread Linsong

Bram Moolenaar wrote:


Vincent Linsong wrote:

 


This is by design.  Some people mentioned that when using the longest
common string the first entry should not be selected.  Now you can use
CTRL-N to select the first entry.  Previously you would need to do
CTRL-N CTRL-P to get the first entry.

 


 I use the omnicompletion like this:
 I set completeopt=menu,preview,longest . Now consider I input some 
characters of a function's name, for example, the function's name is 
'helloWorld' and I input 'hel'. I am not glad to remember the exact 
function name, so I invoke omnicompletion by C-XC-O, then I know 
what is the exact name of the function, instead of press C-N or C-P 
multiple times to select it from the menu, I choose to input more 
characters and when function's name becomes the top entry on the menu, I 
will press C-Y to accept it. I think this way is very convenient and I 
know many intelligence like tools works in this way.
 If others have enough reason to change the behavior, would you like 
to add a new option to make two ways work ?  Thanks a lot!
   


I think the current behavior is best for most people.  For you, instead
of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
stops completion.
 

If I press CTRL-N, then what I inputed will be replaced with the first 
entry of the completion menu, but that is not what I want.
   



I don't get it.  


Sorry, my words is a little confusing.


You type characters until the function you were looking
for is the first match.  Then CTRL-N will select that match and you're
done.
 

In fact, I input more characters until the function I am looking for is 
the the first match, under this case, I want to select the first match 
and make the menu disappear(why? because to my impression, the 
completion is not done until I select some entry and the completion menu 
disappears). But now I have to press CTRL-N CTRL-E to do so, that is not 
very convenient.


Yes, I can make a map make it easier, for example I have the following 
match:

if exists('*pumvisible')
   inoremap Enter C-R=pumvisible() ? \ltC-y : 
\ltEnterCR

endif
   It works very well under vim7d Beta with 
completeopt=menu,preview,longest, this map just makes Enter as the 
confirm key instead of C-Y since I am tempted to use Enter as the 
confirm key. It works in the following two cases:
   case 1: I input charactes and when the first match is what I want, I 
just press Enter to confirm, what I inputed is completed and the 
completion menu disappear
   case 2: I use CTRL-N or CTRL-P to change the highlighted entry to 
the one I want, then I press Enter to confirm.
   But in vim7f Beta, since the first match has not been highlighted 
any more, the map does not work in case 1. I can modify it a little to 
make it work:

   if exists('*pumvisible')
   inoremap Enter C-R=pumvisible() ? \ltC-n\ltC-y : 
\ltEnterCR

   endif
  But it will not work in case 2. I can not work out a way to make it 
work in case 1 and case 2.
  I know what is the reason of the change between vim7f and vim7d and I 
think it is very reasonable. But I still suggest there should be an 
option to highlight the first match of completion menu.


Thanks.

BR
Vincent
   


There is a conflict between saying that the top entry of the menu is the
one you want and CTRL-N not getting what you want.
 






Re: some problem with vim7f Beta

2006-04-26 Thread Linsong

Georg Dahn wrote:


This behavior of C-N and C-P is not new, it was the same befor, too,
not only in Vim 7. It is not wise to change it and BTW, it is a good
behavior for most people.

 My main point is: I don't want to select entry in the completion menu
 by pressing CTRL-N or CTRL-P, instead, I want to input enough
 characters to make correct entry  become the first entry and it is
 highlighted, then I can use CTRL-Y(yes, I have mapped Enter to
 CTRL-Y since I am tempted to use Enter) to confirm the completion.

If you don't want your typed characters to be replaced by the first
completion, just add a mapping like this:

inoremap C-Space C-NC-P


Instead of the above map, I set completeopt=menu,preview,longest to get 
it work.




and it won't be replaced. If you type, then the list of possible
completions gets smaller. You still have to select the correct entry by
yourself, but if I understand you correctly, this might be very near to
that, which you seem to want.


Yes, it is very near to what I want except one thing. But I don't get 
the point why disable to highlight the top entry in the menu in vim7f 
(it is not in vim7d)?  And I am sure there are many persons who want to 
make the top entry highlighted by default. I am not very sure why this 
is changed in vim7f? 
Now, is there a easy way to make the top entry highlighted automatically? 



Best wishes,
Georg


Thanks for your reply.

BR
Vincent


Re: some problem with vim7f Beta

2006-04-26 Thread Bram Moolenaar

Vincent Linsong wrote:

  This behavior of C-N and C-P is not new, it was the same befor, too,
  not only in Vim 7. It is not wise to change it and BTW, it is a good
  behavior for most people.
 
   My main point is: I don't want to select entry in the completion menu
   by pressing CTRL-N or CTRL-P, instead, I want to input enough
   characters to make correct entry  become the first entry and it is
   highlighted, then I can use CTRL-Y(yes, I have mapped Enter to
   CTRL-Y since I am tempted to use Enter) to confirm the completion.
 
  If you don't want your typed characters to be replaced by the first
  completion, just add a mapping like this:
 
  inoremap C-Space C-NC-P
 
 Instead of the above map, I set completeopt=menu,preview,longest to get 
 it work.
 
  and it won't be replaced. If you type, then the list of possible
  completions gets smaller. You still have to select the correct entry by
  yourself, but if I understand you correctly, this might be very near to
  that, which you seem to want.
 
 Yes, it is very near to what I want except one thing. But I don't get 
 the point why disable to highlight the top entry in the menu in vim7f 
 (it is not in vim7d)?  And I am sure there are many persons who want to 
 make the top entry highlighted by default. I am not very sure why this 
 is changed in vim7f? 
 Now, is there a easy way to make the top entry highlighted automatically? 

The problem with highlighting the first entry is that you can't use
CTRL-N to use it.  You would get the second entry.  And using CTRL-N to
select an entry is the main method for completion.  Not many people know
about CTRL-Y.

-- 
DENNIS:  Listen -- strange women lying in ponds distributing swords is no
 basis for a system of government.  Supreme executive power derives
 from a mandate from the masses, not from some farcical aquatic
 ceremony.
  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: some problem with vim7f Beta

2006-04-26 Thread Bram Moolenaar

Vincent Linsong wrote:

 This is by design.  Some people mentioned that when using the longest
 common string the first entry should not be selected.  Now you can use
 CTRL-N to select the first entry.  Previously you would need to do
 CTRL-N CTRL-P to get the first entry.
 
I use the omnicompletion like this:
I set completeopt=menu,preview,longest . Now consider I input some 
 characters of a function's name, for example, the function's name is 
 'helloWorld' and I input 'hel'. I am not glad to remember the exact 
 function name, so I invoke omnicompletion by C-XC-O, then I know 
 what is the exact name of the function, instead of press C-N or C-P 
 multiple times to select it from the menu, I choose to input more 
 characters and when function's name becomes the top entry on the menu, I 
 will press C-Y to accept it. I think this way is very convenient and I 
 know many intelligence like tools works in this way.
If others have enough reason to change the behavior, would you like 
 to add a new option to make two ways work ?  Thanks a lot!
 
 I think the current behavior is best for most people.  For you, instead
 of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
 stops completion.

 If I press CTRL-N, then what I inputed will be replaced with the first 
 entry of the completion menu, but that is not what I want.

I don't get it.  You type characters until the function you were looking
for is the first match.  Then CTRL-N will select that match and you're
done.

There is a conflict between saying that the top entry of the menu is the
one you want and CTRL-N not getting what you want.

-- 
A poem:read aloud:

 !*''#   Waka waka bang splat tick tick hash,
^`$$- Caret quote back-tick dollar dollar dash,
[EMAIL PROTECTED] Bang splat equal at dollar under-score,
%* ~#4   Percent splat waka waka tilde number four,
[]../ Ampersand bracket bracket dot dot slash,
|{,,SYSTEM HALTED  Vertical-bar curly-bracket comma comma CRASH.

Fred Bremmer and Steve Kroese (Calvin College  Seminary of Grand Rapids, MI.)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: some problem with vim7f Beta

2006-04-25 Thread Bram Moolenaar

Vincent Linsong wrote:

 I just try the fresh vim7f Beta on my ubuntu box, found some problems:
 1. the behavior of omnicompletion is changed  
 I set
completeopt=menu,preview,longest
 in vim7d beta, when I input something then press C-XC-O, the 
 completion menu shows up, then as I input more characters, the content 
 of the completion menu is changed and the first entry in the menu is 
 highlighted. But in vim7f, all things work except the first entry is not 
 highlighted. Is it a bug or a design?

This is by design.  Some people mentioned that when using the longest
common string the first entry should not be selected.  Now you can use
CTRL-N to select the first entry.  Previously you would need to do
CTRL-N CTRL-P to get the first entry.

 2. one problem with syntax highlight
Open help by :help command, the '|' is missing, that is 
 |usr_01.txt| now becomes usr_01.txt. This happens in mud colorscheme, 
 but does not occur in desert colorscheme. Maybe this is a problem of the 
 colorscheme, but it works well before(at least in vim7d and vim6.x). It 
 means there is something about syntax highlight changed in vim7f. Is it 
 intended? 

This is intentional.  The || characters mark tags, but can make it more
difficult to read the command being explained.

-- 
**  Hello and Welcome to the Psychiatric Hotline **
If you are obsessive-compulsive, please press 1 repeatedly.
If you are co-dependent, please ask someone to press 2.
If you have multiple personalities, please press 3, 4, 5 and 6.
If you are paranoid-delusional, we know who you are and what you want
   - just stay on the line so we can trace the call.
If you are schizophrenic, listen carefully and a little voice will
   tell you which number to press next.
If you are manic-depressive, it doesn't matter which number you press
   - no one will answer.
If you suffer from panic attacks, push every button you can find.
If you are sane, please hold on - we have the rest of humanity on the
other line and they desparately want to ask you a few questions.

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: some problem with vim7f Beta

2006-04-25 Thread Linsong

Bram Moolenaar wrote:


Vincent Linsong wrote:

 


   I just try the fresh vim7f Beta on my ubuntu box, found some problems:
   1. the behavior of omnicompletion is changed  
   I set

  completeopt=menu,preview,longest
   in vim7d beta, when I input something then press C-XC-O, the 
completion menu shows up, then as I input more characters, the content 
of the completion menu is changed and the first entry in the menu is 
highlighted. But in vim7f, all things work except the first entry is not 
highlighted. Is it a bug or a design?
   



This is by design.  Some people mentioned that when using the longest
common string the first entry should not be selected.  Now you can use
CTRL-N to select the first entry.  Previously you would need to do
CTRL-N CTRL-P to get the first entry.
 


  I use the omnicompletion like this:
  I set completeopt=menu,preview,longest . Now consider I input some 
characters of a function's name, for example, the function's name is 
'helloWorld' and I input 'hel'. I am not glad to remember the exact 
function name, so I invoke omnicompletion by C-XC-O, then I know 
what is the exact name of the function, instead of press C-N or C-P 
multiple times to select it from the menu, I choose to input more 
characters and when function's name becomes the top entry on the menu, I 
will press C-Y to accept it. I think this way is very convenient and I 
know many intelligence like tools works in this way.
  If others have enough reason to change the behavior, would you like 
to add a new option to make two ways work ?  Thanks a lot!


BR
Vincent

 


   2. one problem with syntax highlight
  Open help by :help command, the '|' is missing, that is 
|usr_01.txt| now becomes usr_01.txt. This happens in mud colorscheme, 
but does not occur in desert colorscheme. Maybe this is a problem of the 
colorscheme, but it works well before(at least in vim7d and vim6.x). It 
means there is something about syntax highlight changed in vim7f. Is it 
intended? 
   



This is intentional.  The || characters mark tags, but can make it more
difficult to read the command being explained.

 





Re: some problem with vim7f Beta

2006-04-25 Thread Bram Moolenaar

Vincent Linsong wrote:

 This is by design.  Some people mentioned that when using the longest
 common string the first entry should not be selected.  Now you can use
 CTRL-N to select the first entry.  Previously you would need to do
 CTRL-N CTRL-P to get the first entry.

I use the omnicompletion like this:
I set completeopt=menu,preview,longest . Now consider I input some 
 characters of a function's name, for example, the function's name is 
 'helloWorld' and I input 'hel'. I am not glad to remember the exact 
 function name, so I invoke omnicompletion by C-XC-O, then I know 
 what is the exact name of the function, instead of press C-N or C-P 
 multiple times to select it from the menu, I choose to input more 
 characters and when function's name becomes the top entry on the menu, I 
 will press C-Y to accept it. I think this way is very convenient and I 
 know many intelligence like tools works in this way.
If others have enough reason to change the behavior, would you like 
 to add a new option to make two ways work ?  Thanks a lot!

I think the current behavior is best for most people.  For you, instead
of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
stops completion.

I don't know other tools that use CTRL-Y...  You might be tempted to hit
Enter to accept the current match, we had that discussion before.
That kind of use simply doesn't go well with longest.

-- 
DEAD PERSON:  I don't want to go in the cart!
CUSTOMER: Oh, don't be such a baby.
MORTICIAN:I can't take him...
DEAD PERSON:  I feel fine!
CUSTOMER: Oh, do us a favor...
MORTICIAN:I can't.
  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: some problem with vim7f Beta

2006-04-25 Thread Linsong

Bram Moolenaar wrote:

Hi, Bram
  Thanks for your reply!


Vincent Linsong wrote:

 


This is by design.  Some people mentioned that when using the longest
common string the first entry should not be selected.  Now you can use
CTRL-N to select the first entry.  Previously you would need to do
CTRL-N CTRL-P to get the first entry.
 


  I use the omnicompletion like this:
  I set completeopt=menu,preview,longest . Now consider I input some 
characters of a function's name, for example, the function's name is 
'helloWorld' and I input 'hel'. I am not glad to remember the exact 
function name, so I invoke omnicompletion by C-XC-O, then I know 
what is the exact name of the function, instead of press C-N or C-P 
multiple times to select it from the menu, I choose to input more 
characters and when function's name becomes the top entry on the menu, I 
will press C-Y to accept it. I think this way is very convenient and I 
know many intelligence like tools works in this way.
  If others have enough reason to change the behavior, would you like 
to add a new option to make two ways work ?  Thanks a lot!
   



I think the current behavior is best for most people.  For you, instead
of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
stops completion.
 

If I press CTRL-N, then what I inputed will be replaced with the first 
entry of the completion menu, but that is not what I want.


I don't know other tools that use CTRL-Y... 

I think my sentence is a little confusing. I don't mean CTRL-Y is very 
common but the way to use completion.



You might be tempted to hit
Enter to accept the current match, we had that discussion before.
That kind of use simply doesn't go well with longest.

My main point is: I don't want to select entry in the completion menu by 
pressing CTRL-N or CTRL-P, instead, I want to input enough characters to 
make correct entry  become the first entry and it is highlighted, then I 
can use CTRL-Y(yes, I have mapped Enter to CTRL-Y since I am tempted 
to use Enter) to confirm the completion.


Thanks again.

Best regards,
Vincent






Re: some problem with vim7f Beta

2006-04-25 Thread Bram Moolenaar

Vincent Linsong wrote:

 This is by design.  Some people mentioned that when using the longest
 common string the first entry should not be selected.  Now you can use
 CTRL-N to select the first entry.  Previously you would need to do
 CTRL-N CTRL-P to get the first entry.

I use the omnicompletion like this:
I set completeopt=menu,preview,longest . Now consider I input some 
 characters of a function's name, for example, the function's name is 
 'helloWorld' and I input 'hel'. I am not glad to remember the exact 
 function name, so I invoke omnicompletion by C-XC-O, then I know 
 what is the exact name of the function, instead of press C-N or C-P 
 multiple times to select it from the menu, I choose to input more 
 characters and when function's name becomes the top entry on the menu, I 
 will press C-Y to accept it. I think this way is very convenient and I 
 know many intelligence like tools works in this way.
If others have enough reason to change the behavior, would you like 
 to add a new option to make two ways work ?  Thanks a lot!

I think the current behavior is best for most people.  For you, instead
of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
stops completion.

I don't know other tools that use CTRL-Y...  You might be tempted to hit
Enter to accept the current match, we had that discussion before.
That kind of use simply doesn't go well with longest.

-- 
DEAD PERSON:  I don't want to go in the cart!
CUSTOMER: Oh, don't be such a baby.
MORTICIAN:I can't take him...
DEAD PERSON:  I feel fine!
CUSTOMER: Oh, do us a favor...
MORTICIAN:I can't.
  The Quest for the Holy Grail (Monty Python)

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\download, build and distribute -- http://www.A-A-P.org///
 \\\help me help AIDS victims -- http://ICCF-Holland.org///


Re: some problem with vim7f Beta

2006-04-25 Thread Linsong

Bram Moolenaar wrote:

Hi, Bram
  Thanks for your reply!


Vincent Linsong wrote:

 


This is by design.  Some people mentioned that when using the longest
common string the first entry should not be selected.  Now you can use
CTRL-N to select the first entry.  Previously you would need to do
CTRL-N CTRL-P to get the first entry.
 


  I use the omnicompletion like this:
  I set completeopt=menu,preview,longest . Now consider I input some 
characters of a function's name, for example, the function's name is 
'helloWorld' and I input 'hel'. I am not glad to remember the exact 
function name, so I invoke omnicompletion by C-XC-O, then I know 
what is the exact name of the function, instead of press C-N or C-P 
multiple times to select it from the menu, I choose to input more 
characters and when function's name becomes the top entry on the menu, I 
will press C-Y to accept it. I think this way is very convenient and I 
know many intelligence like tools works in this way.
  If others have enough reason to change the behavior, would you like 
to add a new option to make two ways work ?  Thanks a lot!
   



I think the current behavior is best for most people.  For you, instead
of pressing CTRL-Y you can use CTRL-N and continue typing, that normally
stops completion.
 

If I press CTRL-N, then what I inputed will be replaced with the first 
entry of the completion menu, but that is not what I want.


I don't know other tools that use CTRL-Y... 

I think my sentence is a little confusing. I don't mean CTRL-Y is very 
common but the way to use completion.



You might be tempted to hit
Enter to accept the current match, we had that discussion before.
That kind of use simply doesn't go well with longest.

My main point is: I don't want to select entry in the completion menu by 
pressing CTRL-N or CTRL-P, instead, I want to input enough characters to 
make correct entry  become the first entry and it is highlighted, then I 
can use CTRL-Y(yes, I have mapped Enter to CTRL-Y since I am tempted 
to use Enter) to confirm the completion.


Thanks again.

Best regards,
Vincent






Re: some problem with vim7f Beta

2006-04-25 Thread Georg Dahn

This behavior of C-N and C-P is not new, it was the same befor, too,
not only in Vim 7. It is not wise to change it and BTW, it is a good
behavior for most people.

 My main point is: I don't want to select entry in the completion menu
 by pressing CTRL-N or CTRL-P, instead, I want to input enough
 characters to make correct entry  become the first entry and it is
 highlighted, then I can use CTRL-Y(yes, I have mapped Enter to
 CTRL-Y since I am tempted to use Enter) to confirm the completion.

If you don't want your typed characters to be replaced by the first
completion, just add a mapping like this:

inoremap C-Space C-NC-P

and it won't be replaced. If you type, then the list of possible
completions gets smaller. You still have to select the correct entry by
yourself, but if I understand you correctly, this might be very near to
that, which you seem to want.

Best wishes,
Georg








___ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com