[dev] Re: Experimental editor

2011-06-15 Thread Christian Neukirchen
Josh Rickmar joshua_rick...@eumx.net writes:

 This makes sense.  I love sam, but always wished there was a way to
 switch to the command window (~~sam~~) using the keyboard.

I think sam together with the common discussed keybindings (which are
partly implemented in p9p already), up/down-cursor keys for line
movement(!) and shift-cursor selection would be a very usable and powerful
editor already.

Next step would be to drop its windowing system and use X11 windows.

I'd also kill for a console samterm. ;)

-- 
Christian Neukirchen  chneukirc...@gmail.com  http://chneukirchen.org




Re: [dev] Re: Experimental editor

2011-06-15 Thread Josh Rickmar
On Wed, Jun 15, 2011 at 04:42:27PM +0200, Christian Neukirchen wrote:
 Josh Rickmar joshua_rick...@eumx.net writes:
 
  This makes sense.  I love sam, but always wished there was a way to
  switch to the command window (~~sam~~) using the keyboard.
 
 I think sam together with the common discussed keybindings (which are
 partly implemented in p9p already), up/down-cursor keys for line
 movement(!) and shift-cursor selection would be a very usable and powerful
 editor already.
 
 Next step would be to drop its windowing system and use X11 windows.
 
 I'd also kill for a console samterm. ;)

Why not just keep the underlying sam the same (sam -d) but write a
different samterm for it which does one window per buffer? This
would also make it easy to switch to any buffer you wanted since
it would just be part of the window manger.



[dev] Re: Experimental editor

2011-06-15 Thread Christian Neukirchen
Josh Rickmar joshua_rick...@eumx.net writes:

 Why not just keep the underlying sam the same (sam -d) but write a
 different samterm for it which does one window per buffer? This
 would also make it easy to switch to any buffer you wanted since
 it would just be part of the window manger.

That's how I'd do it if I had the time, but note that samterm contains
some nontrivial logic itself, too.

-- 
Christian Neukirchen  chneukirc...@gmail.com  http://chneukirchen.org




Re: [dev] Re: Experimental editor

2011-06-15 Thread Connor Lane Smith
On 15 June 2011 15:54, Josh Rickmar joshua_rick...@eumx.net wrote:
 Why not just keep the underlying sam the same (sam -d) but write a
 different samterm for it which does one window per buffer?

That question is where my editor started. The answer to why not is,
sam is ugly. A common misconception is that samterm just speaks the
same language as sam -d. It doesn't, it uses a custom binary protocol
and contains a lot of caching logic and so on. The protocol wasn't
designed before implementation, I think, and it was not designed with
writing an alternative samterm in mind. It's just a de facto protocol,
and imo it is quite broken.

After starting a few samterms over the past year I decided the
protocol is just too obscure, and we can make it a lot simpler just by
writing something from scratch. That way we can also take advantage of
the new back-end, allowing us to use interactive structural regular
expressions and so on. It's easier to write a new sam-inspired editor
than restrict ourselves to the samterm protocol. And that's what I'm
going to do, rolling in a few ideas from other editors as I go.

cls