From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: References: Date: Fri, 11 Jan 2013 12:46:17 +0100 Message-ID: From: =?UTF-8?B?QmVuY2UgRsOhYmnDoW4=?= To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: multipart/alternative; boundary=047d7b2e06c9e4faa404d301d779 Subject: Re: [9fans] How to do this with [acme | sam | sed ] ? Topicbox-Message-UUID: 05c1b214-ead8-11e9-9d60-3106f5b1d025 --047d7b2e06c9e4faa404d301d779 Content-Type: text/plain; charset=UTF-8 for the third: /\+\+[a-zA-Z_]+[0-9a-zA-Z_]*/{ x/\+\+/d a/++/ } the braces stuff is pretty tough, but maybe someone will have an idea. however it is really easy to do it by hand in acme. click on the inside of the opening paren with a double click then click button 2 (while still holding down button 1 from the double click) this will cut everything inside that and the matching paren. then highlight the remaining () and while still holding down button 1 push button3. Looks complicated written down but it's a really quick and easy to learn sequence. 2013/1/11 Peter A. Cejchan > ## How to do this with [acme | sam | sed ] ? > # compound commands > # remove outermost pair of braces: abcd(x+(y-z))efgh --> abcdx+(y-z)efgh > [ no idea :-( ] > # remove semicolon before // comments: xyz;[tab][space]*// --> xyz > [ Edit /;[ ]*\/\// Edit s/;// # find and remove semicolon > before // comments ] > # prefix to postfix operator: ++i --> i++ > [ Edit s/\+\+[a-zA-Z]+[0-9a-zA-Z]*/&++/ Edit s/\+\+/d] > > thanks, > ++pac > > --047d7b2e06c9e4faa404d301d779 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
for the third:
/\+\+[a-zA-Z_]+[0-9a-zA-Z_]*/{
x/\+\+/d
a/++/
}

the braces stuff is pretty tough, but maybe someo= ne will have an idea.
however it is really easy to do it by= hand in acme.

click on the inside of = the opening paren with a double click then click button 2
(while still holding down button 1 from the double click) this w= ill cut everything
inside that and the matching paren. then= highlight the remaining () and while=C2=A0
still holding d= own button 1 push button3.
Looks complicated written down but it's a really quick and e= asy to learn sequence.



2013/1/11 Peter A. Cejchan <tyap= ca7@gmail.com>
## How to do this with [acme | sam | sed ] = =C2=A0?
# compound commands
# remove outermost pair of braces: =C2=A0abcd(x+(y-z))efgh =C2=A0--> abc= dx+(y-z)efgh
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ no idea :-( ]
# remove semicolon before // comments: =C2=A0xyz;[tab][space]*// =C2=A0--&g= t; xyz
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ Edit /;[ =C2=A0 =C2=A0 ]*\/\// Edit s/;= // =C2=A0 =C2=A0 =C2=A0# find and remove semicolon
before // comments ]
# prefix to postfix operator: ++i --> i++
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0[ Edit s/\+\+[a-zA-Z]+[0-9a-zA-Z]*/&+= +/ Edit s/\+\+/d]

thanks,
++pac


--047d7b2e06c9e4faa404d301d779--