On Jan 25, 2008 1:58 PM, Ralph Shumaker <[EMAIL PROTECTED]> wrote:
> I know the vim command :%s///gc to replace throughout the file, with
> verification, including multiple occurrences on individual lines. But
> I'm not quite sure how to go about what I want.
>
> I want to issue the command such that any lines that are not ^$$
> (BOL$EOL) or ^%$ will get <br> appended *unless* the line already ends
> <br>$ (<br>EOL).
>
I think I understand that sometimes when you write "$" you mean the
dollar-sign character and other times you mean the symbolic
representation of End-Of-Line. But it is not completely clear.
Perhaps the command you are looking for is "g!" global exclude.
:%g!/pattern/action # perform action on all lines not
matching pattern
# action can include another
substitution match
# and other specifications
like g)lobal and c)onfirm
:%g!/pattern/s/pattern2/new thing/gc
carl
--
carl lowenstein marine physical lab u.c. san diego
[EMAIL PROTECTED]
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list