Re: Vim-7.0f: error in help for :tabmove

2006-04-25 Thread Bram Moolenaar

Gary Johnson wrote:

 :help :tabmove now (in 7.0f) contains this:
 
   *:tabm* *:tabmove*
 :tabmove NMove the current tab page to after tab page N.  Use zero to
   make the current tab page the first one.  Without N the tab
   page is made the last one.
 
 I believe that the command should be shown with brackets around the 
 optional part, like this:
 
 :tabm[ove] N  Move the current tab page to after tab page N.  Use zero to

Right.  And the N should be in square brackets, since it's optional.

-- 
FIRST GUARD: Ah!  Now ... we're not allowed to ...
   SIR LAUNCELOT runs him through,  grabs his spear and stabs the other
   guard who collapses in a heap.  Hiccoughs quietly.
 Monty Python and the Holy Grail PYTHON (MONTY) PICTURES LTD

 /// 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.

 





vim70f, no hyphen-suggestions, dictionary bug(?)

2006-04-25 Thread Milan Berta
Hello Vim-Dev,

Is this only my problem, or is this really a bug?

There are no suggestions with hyphen - in the list of suggestions (for
example, on z= request in normal mode. There are a lot of possibilities
with the hyphen in long words (especially in English). But they are just
not shown. ('badboy' could be 'bad-boy', 'noncentrosymmetric' could be
'non-centrosymmetric',..)

How come? Wrong .aff or .dic?

I'm spelling with the .spl files added to the vim70f release.

Best regards,
Milan

-- 
* Milan Berta
* Institute of Physics
* Academy of Sciences of the Czech Republic
* Na Slovance 2
* CZ-182 21 Prague 8
* Czech Republic
* 
* mailto: [EMAIL PROTECTED]
* phone:  +420 266 052 650, +420 266 052 748
* fax:+420 286 890 416
* URL:http://www.fzu.cz/


Re: Vim 7.0f BETA

2006-04-25 Thread Neil Bird

Around about 25/04/06 08:48, Yakov Lerner typed ...

feedkeys({string} [, {mode}])   *feedkeys()*
Characters in {string} are queued for processing as if they
come from a mapping or where typed by user.  They are added to

  ^  typo.

--
[EMAIL PROTECTED] ~]# rm -f .signature
[EMAIL PROTECTED] ~]# ls -l .signature
ls: .signature: No such file or directory
[EMAIL PROTECTED] ~]# exit


Re: vim70f, no hyphen-suggestions, dictionary bug(?)

2006-04-25 Thread Bram Moolenaar

Milan Berta wrote:

 Is this only my problem, or is this really a bug?
 
 There are no suggestions with hyphen - in the list of suggestions (for
 example, on z= request in normal mode. There are a lot of possibilities
 with the hyphen in long words (especially in English). But they are just
 not shown. ('badboy' could be 'bad-boy', 'noncentrosymmetric' could be
 'non-centrosymmetric',..)
 
 How come? Wrong .aff or .dic?
 
 I'm spelling with the .spl files added to the vim70f release.

I'm assuming you are using English.  This is different for every
language.

Vim can handle hyphens very well (as far as I know).  The words with
hyphen must appear in the dictionary.  You can't put a hyphen between
every two words.  I don't think bad-boy is a valid word.
bad-tempered and bad-egg are.

-- 
This is the polymorph virus!  Follow these instructions carefully:
1. Send this message to everybody you know.
2. Format your harddisk.
Thank you for your cooperation in spreading the most powerful virus ever!

 /// 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:

 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: :for var in list

2006-04-25 Thread James Vega
On Tue, Apr 25, 2006 at 02:21:07PM -0400, Charles E Campbell Jr wrote:
 Hello!
 
 I know this is a late date, but I think it would be helpful if
 
  for var in list
  ...
  endfor
 
 would complete with var= .  For example where this might come in handy:
 
 for home in split(rtp,',')
  if isdirectory(home) | break | endif
 endfor

This seems like a rather arbitrary imposition.  There could be
legitimate reasons for var getting the value  in a loop (such as
looping over the results from matchlist()) which would be confused by
adding an additional loop with var = .

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Re: :for var in list

2006-04-25 Thread Charles E Campbell Jr

James Vega wrote:


On Tue, Apr 25, 2006 at 02:21:07PM -0400, Charles E Campbell Jr wrote:
 


I know this is a late date, but I think it would be helpful if

for var in list
...
endfor

would complete with var= .  For example where this might come in handy:

for home in split(rtp,',')
if isdirectory(home) | break | endif
endfor
   



This seems like a rather arbitrary imposition.  There could be
legitimate reasons for var getting the value  in a loop (such as
looping over the results from matchlist()) which would be confused by
adding an additional loop with var = .
 

I'm afraid I don't understand what you mean about adding an additional 
loop; I don't see where
having the home variable take on an empty meaning (whether  or []) 
when the loop terminates
would have much to do with any additional loop.   Its true that an any 
empty condition could be
legitimately in a  list, though.  It still might be handy to have a 
standard setting (such as  or []) at

end-of-for-loop without a break.

Regards,
Chip Campbell



Re: :for var in list

2006-04-25 Thread Bram Moolenaar

Charles Campbell wrote:

 I know this is a late date, but I think it would be helpful if
 
   for var in list
   ...
   endfor
 
 would complete with var= .  For example where this might come in handy:
 
 for home in split(rtp,',')
   if isdirectory(home) | break | endif
 endfor
 
 So, if the loop was unsuccessful, then home would be an empty.  If its 
 successful, home
 is set to something useful.   Easy to test without extra clutter such as 
 test variables.

This for loop is like it is in Python, and it has proven to be very
useful.

It's easy to add something to the list if you want to loop over more
things.  E.g.:

 for home in split(rtp,',') + ['']
   if isdirectory(home) | break | endif
 endfor

-- 
CUSTOMER: You're not fooling anyone y'know.  Look, isn't there something
  you can do?
DEAD PERSON:  I feel happy... I feel happy.
[whop]
CUSTOMER: Ah, thanks very much.
MORTICIAN:Not at all.  See you on Thursday.
CUSTOMER: Right.
  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: :for var in list

2006-04-25 Thread Charles E Campbell Jr

Bram Moolenaar wrote:


Charles Campbell wrote:

 


I know this is a late date, but I think it would be helpful if

 for var in list
 ...
 endfor

would complete with var= ...
   



This for loop is like it is in Python, and it has proven to be very
useful.

It's easy to add something to the list if you want to loop over more
things.  E.g.:

 for home in split(rtp,',') + ['']
   if isdirectory(home) | break | endif
 endfor
 



Looks like a good way to do it.  Haven't used Python myself; probably 
will learn more Python

using Vim's 7.0 language!

Thank you,
Chip Campbell




Re: :for var in list

2006-04-25 Thread Mike Steed
On Tue, Apr 25, 2006 at 10:32:35PM +0200, Bram Moolenaar wrote:

 This for loop is like it is in Python, and it has proven to be very
 useful.
 
 It's easy to add something to the list if you want to loop over more
 things.  E.g.:
 
for home in split(rtp,',') + ['']
  if isdirectory(home) | break | endif
endfor

One relevant difference is that Python's for has an else clause:

  for x in list:
if some_condition:
  break
  else:
# this executes only if the loop completed without a break
do_something

It's strange to use 'else' for this, but it does fill a need.


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