Re: [dev] another text user interface for sam

From: Raphaël Proust <raphlalou_AT_gmail.com>
Date: Wed, 2 Mar 2016 10:14:48 +0000

On 1 March 2016 at 17:12, Marc André Tanner <mat_AT_brain-dump.org> wrote:
> I think structural regexp will integrate nicely with multiple selections.
>
> […]

Yes! Interactive structural regexp would definitely be a Killer
Feature™ IMO. I would probably use an editor like that almost
exclusively.


On 1 March 2016 at 20:35, Marc André Tanner <mat_AT_brain-dump.org> wrote:
> On Tue, Mar 01, 2016 at 05:41:00PM +0000, Connor Lane Smith wrote:
>> On 1 March 2016 at 17:12, Marc André Tanner <mat_AT_brain-dump.org> wrote:
>> > All commands of a group should operate on the original state of the text.
>>
>> Is that strictly necessary? I know that's how sam and acme behave, but
>
> I haven't yet made my mind up. It obviously changes the semantics of the
> command language.

Why not have both? A parallel grouping mechanism ({} to keep
compatibility with sam) and a sequential one ([], or <>, or (), or
whatever).

Then one can write both parallel transformations (that avoid, capture
of previous changes) and sequential ones.

/*swap two words*/
 ,x[a-zA-Z]+/{
  g/fred/ v/...../ c/jim/
  g/jim/ v/..../ c/fred/
 }

/*do some transformation, measure line count before and after*/
,y/\n\n/[
>wc -l
|<some-command>
>wc -l
]
Received on Wed Mar 02 2016 - 11:14:48 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 02 2016 - 11:24:11 CET