Facebook Application
Fairlight
fairlite at fairlite.com
Wed Dec 16 18:55:29 PST 2009
On Thu, Dec 17, 2009 at 12:44:44PM +1000, after drawing runes in goat's blood,
Ken Cole cast forth these immortal, mystical words:
> Actually:
>
> % means the entire file and other commands can follow it, not just "s"
>
> and from what I can find % and g do mean the same thing as would
> :1,419s if you knew there were 419 lines in the file. The other two
> options are easier but for the sake of the discussion! :-)
True, although, Bill Vermillion taught me a couple neat ones, including:
Delete all lines:
:1,$d
So :1,419s would be more easily expressed 1,$s I think.
As well, if you were on a certain line and wanted only things from that
line forward to the end of the file replaced:
:.,$s
I'm used to using :.,$d when I do email replies (which is why my signature
is sometimes missing, if I'm in a hurry). :) Another handy one is :1,.d
which deletes all lines from the start to present line (inclusive).
Bill was a veritable vi dictionary.
mark->
More information about the Filepro-list
mailing list