[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: vi Qustion



On Thu, 10 Jul 2003 22:42:35 -0400
Rick Pasotto <rick@niof.net> wrote:
> :%s/^/text/
 
> is all you need.

    Showing the regex was also covering the other base which is if the
entire line isn't needed, or repeating text in the line.  IE *any regex can go
here*.

> You sure like to do things the hard way!

    Actually I prefer the easy way.

> Lower case 'm' sets a mark so type 'ma' at one end of the range and 'mb'
> at the other end and then (the single quote goes to a mark):
 
> :'a,'bs/^/text/
 
> Works in vi and vim.

    Now tell me the difference between V, v and CNTL-V and how mark would
emulate all three.  Hint: It can't emulate the third one.  By remembering
which is which one can recall one single letter for the same basic operation
with three different modes.  For those who don't know V marks entire lines, v
marks from one character to another character across lines, CNTL-V marks
columns within a line.  To my knowledge m cannot mark off columns. 
Furthermore I've never had a need to know how to place a mark... ever... in
20+ years of editing on a computer it's never once come up as a useful thing
to me.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
       PGP Key: 8B6E99C5       | main connection to the switchboard of souls.
	                       |    -- Lenny Nero - Strange Days
-------------------------------+---------------------------------------------

Attachment: pgpdwSgTEJqcQ.pgp
Description: PGP signature


Reply to: