[Toybox] [PATCH] vi: small fixes.

Jarno Mäkipää jmakip87 at gmail.com
Sun Sep 8 00:08:36 PDT 2019


Mailinglist didint send me Rob:s message and I feel like I am missing
sometimes other messages too. But I saw robs message on archive so
wanted to reply anyway so i copy pasted it here...



Rob Landley <rob at landley.net> wrote:

>So never edit a makefile with this?

>What _other_ changes does it make the data it's modifying? (My plan for non-unix
>line endings was to treat them like any other low ascii character and show the
>^M version. I made escape character display logic and everything...)

>Rob

Right now tabs are just converted to 2 spaces, for making displaying
easier but ofc this should not happen. But instead tabs should be kept
intact in editing buffer, but perhaps being converted to spaces when
displaying. Or just display them as tabs and have headache with long
lines.

So you should not edit makefiles yet

Line ending rule should be parsed from file when loading and
preserved, unless user wants to convert them.

Perhaps the next focus should be to preserve file as intact as possible...


-Jarno



On Sat, Sep 7, 2019 at 10:23 PM Jarno Mäkipää <jmakip87 at gmail.com> wrote:
>
> I apologize for potentially being responsible of destroying config
> files on your device :-)
>
> Happy to hear someone already tried to use it. There will be some
> problems with files that has non UNIX line-endings also tabs will be
> replaced by spaces etc...
> But for task like changing variable or commenting out few lines it
> might come handy when there is nothing else available.
>
> I'm trying to find time and motivation to continue working on this,
> now as the summer has past.
>
> -Jarno
>
> On Sat, Sep 7, 2019 at 10:20 AM enh via Toybox <toybox at lists.landley.net> wrote:
> >
> > I really needed to be able to edit a file on the device, and this was
> > the nearest thing handy, and it turns out to be more or less usable for
> > basic editing, so...
> >
> > Support cursor keys.
> >
> > Support :q (since there's currently no record of whether the file's
> > modified or not, :q is the same as :q!).
> >
> > Add 'A' to insert at end of line.
> >
> > Add 'n' to find next after '/'.
> >
> > Fix backspace all the way to get out of ex command mode.
> >
> > Fix escape sequences to not hard-code assumptions about the terminal's
> > default background and foreground colors.
> >
> > Fix 'spesial' typo for 'special', and remove explicit array sizes.
> > ---
> >  toys/pending/vi.c | 109 ++++++++++++++++++++++++++++------------------
> >  1 file changed, 66 insertions(+), 43 deletions(-)
> > _______________________________________________
> > Toybox mailing list
> > Toybox at lists.landley.net
> > http://lists.landley.net/listinfo.cgi/toybox-landley.net



More information about the Toybox mailing list