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).
Ralph<br>
<br>
--------------------<br>
$
sig 1<br>
--anon<br>
%
sig 2<br>
--anon<br>
%
new sig
--anon
%
newer sig
--anon
%
newest sig
--anon
The command, when issued, should add <br> to the end of each of the new
sigs, but not to any of the lines that already end with <br> *nor* to
any of the lines containing only $ or %. The exceptions are making it
overly complex in my mind. I'm not terribly familiar with regex. I use
it infrequently.
I'm thinking about creating a script file called sigs that will load the
sig file with vim. After I exit vim, the script will then use sed to
check for <br>$ and add them wherever needed.
TIA
--
Ralph
--------------------
I will also add, that to me, to believe that everything I see in nature,
and everything we know about the universe (and what we are yet to
learn), came about accidentally, with no intelligent entity creating it,
is simply beyond scientific reason.
--Paul G. Allen
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-list