[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thoughts on sweet-expression editor modes (including ParEdit operations)

This page is part of the web mail archives of SRFI 110 from before July 7th, 2015. The new archives for SRFI 110 contain all messages, not just those from before July 7th, 2015.

On Thu, 8 Aug 2013 23:38:08 -0400, Alexey Radul <axofch@xxxxxxxxx> wrote:
> The one trick is, in
> |foo
> ! bar
> does forward-<anything>-sexp scope over just foo, or all of foo and
> bar?  With actual s-expressions, there would be an explicit open paren
> there, so whether the cursor was in front of or behind it would
> determine the answer.  The immortality of having implemented an
> excellent editor mode awaits anyone who can solve this problem (in a
> coherent and useful way).

There are probably lots of ways to address it; I suspect experimentation
would be needed to find a good approach (I'm sure there'd never
be universal agreement).

One approach might be to pick a default scope, and then define some
other key that can change the scope.  Maybe a "shorten" prefix, or a
"do-that-last-operation-but-use-the-other-scope-instead" key.
For example, if it's not clear if it's "before" or "after" the implied paren,
pick one as the default, and define a prefix to use the other one.

Another would be to define a few keys for *selecting* a scope
(that would then highlight the scope), and then separately define keys
to do certain operations on the scope.  That might be easier to
get used to, since there'd be a visual cue.

--- David A. Wheeler