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