Re: [dev] [RFC] Design of a vim like text editor

From: Marc André Tanner <>
Date: Wed, 24 Sep 2014 22:41:29 +0200

On Wed, Sep 24, 2014 at 04:05:46PM -0400, Wolfgang Corcoran-Mathe wrote:
> Quoth Marc André Tanner on Wed, Sep 24 2014 21:21 +0200:
> >>o O should go into insert mode after adding the line
> >>a appends at the current cursor place
> >
> >Fixed
> Marc,
> Thanks very much for your tremendous work on vis.

No problem, contributions welcome!

> As currently implemented, o moves the last non-newline character of
> the current line to the beginning of the next. e.g.:
> --------|
> o
> --------
> |
> ^
> cursor is here.
> A begins appending
> _before_ the last non-newline character of the current line.

Ok the problem is the following commit which makes '$' move
to the last character of a line.

I actually wondered why there are so few calls to text_line_end and
didn't realize that this is used indirectly via a movement to
MOVE_LINE_END in many places.

Turns out both variants (moving to the new line at the end of a line
and to the character immediately before) are actually needed. This
is unfortunate and a bit ugly. I will have to give it some more
thought. In the mean time reverting the above mentioned commit
should fix those end of line issues.

> In addition, a inserts a newline when used at the beginning of an
> empty line (is this intentional and ed-like?),

Not really intentional but does it really matter? Why would you use
'a' on an empty line instead of 'i'?

 Marc André Tanner >< >< GPG key: CF7D56C0
Received on Wed Sep 24 2014 - 22:41:29 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 24 2014 - 22:48:07 CEST