Re: Deleting lines from L1 to L2 in Vim script

2006-05-30 Thread Tim Chase
I would like to to delete line from L1 to L2, I try to script that but obviously commands are different for a script. What is the right thing to do ? Well, if L1 and L2 represent fixed line numbers, such as line 24 through line 38, you can just put 24,38d in your script. Quick,

Re: Deleting lines from L1 to L2 in Vim script

2006-05-30 Thread Christian J. Robinson
Today (Tue, 30 May 2006), Baha-Eddine MOKADEM wrote: I would like to to delete line from L1 to L2, I try to script that but obviously commands are different for a script. What is the right thing to do ? The easiest way to do it is with the :delete command (see :help :delete). For example:

Re: Deleting lines from L1 to L2 in Vim script

2006-05-30 Thread Mikolaj Machowski
Dnia wtorek, 30 maja 2006 11:43, Baha-Eddine MOKADEM napisaƂ: Hi, I would like to to delete line from L1 to L2, I try to script that but obviously commands are different for a script. Why? Just place something like:: 5,10d in script and it will work. If you want to use variables::

Re: Deleting lines from L1 to L2 in Vim script

2006-05-30 Thread Tim Chase
And how about deleting from line L1 for instance to the end of the file. And put it in a script file, since G don't appear like a regexp and $ represent end of line if I'm not wrong ? $ represents the end-of-line in *normal* mode. As an Ex command, it means the last line in the file. Thus,

Re: Deleting lines from L1 to L2 in Vim script

2006-05-30 Thread A.J.Mechelynck
Tim Chase wrote: And how about deleting from line L1 for instance to the end of the file. And put it in a script file, since G don't appear like a regexp and $ represent end of line if I'm not wrong ? $ represents the end-of-line in *normal* mode. As an Ex command, it means the last line in