Re: [dev] another text user interface for sam

From: Greg Reagle <>
Date: Wed, 2 Mar 2016 12:29:59 -0500

On 03/02/2016 11:22 AM, Connor Lane Smith wrote:
> On 2 March 2016 at 16:06, Greg Reagle <> wrote:
>> Well sam has ISRE, but it lacks a nano/vi/emacs-like (full screen interactive) TUI.
> I think the key to *interactive* structural regular expressions is
> that it must be possible to position oneself 'within' an expression.
> Suppose you write x/re/, then sam will simply print all of the
> matching substrings, just as though you'd written x/re/p. So dot does
> not reflect the fact that if you added further commands then they
> would be performed on each of those matches. In order to be
> interactive, it must be possible to write the command interactively,
> rather than composing the whole expression in one go and sending it to
> the editor to evaluate. That's why multiple cursors are crucial: they
> allow you to collect all the matches, then to decide how to *interact*
> with them. So I don't agree that sam's structural regular expressions
> are interactive in that sense. That's my main complaint.

I see your point. If you do `, x/echo/` samterm highlights only the last match because its paradigm is that there is only one dot/selection. It would be nice if sam had the ability to highlight all matches.

But there are tricks to use it more interactively. If you already know these, please excuse me.

`, x/echo/ =` prints the location, line number(s) and column number(s), of every match. You can double click on these results (albeit one at a time) and "send" to highlight each match.

You can undo any change in case it's not what you want.
Received on Wed Mar 02 2016 - 18:29:59 CET

This archive was generated by hypermail 2.3.0 : Wed Mar 02 2016 - 18:36:14 CET