Re: [dev] [ANNOUNCE] vis-0.1: first release of a vim-like editor

From: Marc André Tanner <mat_AT_brain-dump.org>
Date: Mon, 15 Feb 2016 17:34:58 +0100

On Sun, Feb 14, 2016 at 03:17:35PM +0000, Maxime Coste wrote:
> On Sat, Feb 13, 2016 at 02:11:28PM +0100, Marc André Tanner wrote:
> > On Mon, Jan 18, 2016 at 08:24:14AM +0100, Jan Christoph Ebersbach wrote:
> > > - I miss that I can't align multiple cursors in insert mode, i.e. to
> > > align all "=" over multiple lines. The editor kakoune supports this
> > > nicely
> >
> > I just implemented basic support for this with Shift-Tab in insert/replace
> > mode. It is most likely not (yet?) as powerful as kakoune (it has been
> > a while since I last played around with kak).
> >
> > For example it won't work as expected when multiple cursors are on the
> > same line.
>
> Kakoune logic for that is to treat multiple selections on same line as columns,
> so the first selections on each lines are aligned together, eventual second
> selections are aligned together and so on.
>
> Not sure if vis uses only cursors or selections, but the logic of aligning
> cursors by inserting before the begining of selection does work well, as
> it handle left and right alignment.

Yes this makes sense. It is just that vis' selection handling is rather
primitive at the moment. There is no relation kept among selections, that
is they are not sorted (nor merged if they overlap). Thus when given a
selection it is currently not easy to determine whether another selection
is on the same line.

In general what kind of data structure do you use to keep track of cursors
when the buffer changes? That is when something is inserted/deleted at a
cursor location, do you need to update the location of all subsequent
cursors?

If you don't mind I would also like to discuss different approaches
to a client/server design. What kind of protocol do you use? Am I right
that the clients are rather "dumb" i.e. they just forward keyboard input
and display stuff rendered by the server process?

In Kakoune external programs/plugins talk to the editor via a bunch
of built in commands, manipulating the buffer content through regular
keyboard shortcuts, right? Do you feel this is flexible enough? Doesn't
this completely break if the user decides to change some keyboard mappings?

For vis I'm wondering what kind of RPC interface to expose. As an extreme
example should it be possible to connect with both a vim like and an
Emacs like interface to the same session/buffer? That is should the main
editor logic be client side and the server would only propagate buffer
changes and keep some shared state (e.g. registers, marks, macros ...)?

Looking forward to your comments and thanks for Kakoune it has some nice
ideas!

-- 
 Marc André Tanner >< http://www.brain-dump.org/ >< GPG key: 10C93617
Received on Mon Feb 15 2016 - 17:34:58 CET

This archive was generated by hypermail 2.3.0 : Mon Feb 15 2016 - 17:36:11 CET