[Toybox] Editors and such.

Rob Landley rob at landley.net
Sat Jun 30 16:00:08 PDT 2012


On 06/30/2012 03:42 PM, David Seikel wrote:
>> There are times scrolling existing text would be nice. Keep in mind
>> that's half of what "less" does".
> 
> I did not mean the functionality of scrolling text, I meant using escape
> sequences for scrolling text.  It already scrolls text, it just does a
> screen redraw instead of trying to figure out which bit of the screen
> it can scroll with escape sequences first before drawing the rest.

I'm currently debugging a horrible fedora-only build issue where running
a shell script snippet via /bin/bash inserts stuff at the start of the
$PATH for some reason. (Maybe /etc/profile? Fedora is horribly
overcomplicated.) This, like everything else, breaks cross compiling.

I'm running it under kvm, where screen writes are extremely expensive
due to the 2D sdl graphics card emulation.

Scrolling the screen is a bitblt, but redrawing the screen is slow
enough that I can see the characters redraw in the xterm.

This means cursoring down in another less implementation will be
essentially instantaneous in otherimplementations, and will take a
couple seconds per cursor-down key in the one you're proposing.

Saving redrawing half a line is useless, but redrawing the entire screen
unnecessarily rather than moving the lines of text up/down is still
pretty noticeable.

> This is one of the reasons I was checking if we ever have to deal with
> slow connections.  Fast ones can handle complete redraws for paging
> and scrolling, and that keeps the code simple.  Optimized redraws can
> come later if we feel it's needed.

Optimizing redraws is more complicated than it's worth, but _avoiding_
redraws is a pretty common case that can be expensive in certain
contexts. (Scrolling up or down, happens a lot.)

>> Basically, "vi" and "less" are my two initial use cases for this.
>> Emacs ain't in posix. If it's a really trivial additional binding
>> (basically a .config file), fine. But I personally will never use it,
>> and no standard requires it.
> 
> I would not use vi or emacs, so it's gonna do what ever I like as an
> editor as well as those two.  Once it can deal with the horrid vi
> command and insert modes, which are no longer needed, just ancient
> historic artefacts, then a simple emacs editor is just a matter of
> different key bindings.

If you say so...

> It's gotta scratch my itches as well, or it's not worth my time.

Oh sure.

> And people will scream if I leave out emacs.  shrugs

I honestly don't care, but if it's easy to do...

Rob
-- 
GNU/Linux isn't: Linux=GPLv2, GNU=GPLv3+, they can't share code.
Either it's "mere aggregation", or a license violation.  Pick one.

 1341097208.0


More information about the Toybox mailing list