Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-23 Thread Rob Landley
On 1/23/20 5:09 PM, David Seikel wrote: > On 2020-01-23 11:40:19, Rob Landley wrote: > >> My own todo list item for a text editor was to make a generic engine I could >> implement vi, emacs, nano/edit, and joe (wordstar) keybindings on top of (and >> MAYBE share plumbing with less and watch). >

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-23 Thread David Seikel
On 2020-01-23 11:40:19, Rob Landley wrote: > My own todo list item for a text editor was to make a generic engine I could > implement vi, emacs, nano/edit, and joe (wordstar) keybindings on top of (and > MAYBE share plumbing with less and watch). Which I did write for you, including sharing plum

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-23 Thread Rob Landley
On 1/22/20 10:53 AM, dmccunney wrote: > On Sat, Jan 18, 2020 at 2:34 AM Jarno Mäkipää wrote: >> >> I looked into ex commands little bit more, All the edits seem to be >> line based or correct me if im wrong? > > No, that's correct. Ex is a line editor. > > AT&T Unix provided vi, ex, and view.

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-22 Thread dmccunney
On Sat, Jan 18, 2020 at 2:34 AM Jarno Mäkipää wrote: > > I looked into ex commands little bit more, All the edits seem to be > line based or correct me if im wrong? No, that's correct. Ex is a line editor. AT&T Unix provided vi, ex, and view. Vi was the full screen editor. Ex was a line edito

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-17 Thread Jarno Mäkipää
I looked into ex commands little bit more, All the edits seem to be line based or correct me if im wrong? So ex commands dont naturally provide way to test the difficult cases such as: delete until start of word at current cursor position in last line of document when we are sitting in this zalgo t

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-17 Thread Rob Landley
On 1/17/20 11:36 AM, enh via Toybox wrote: > alternatively we could say "we don't actually care about ex, but do > want to have a 'scriptable vi'" and have a mode where toybox vi takes > commands that are just vi commands, not ex commands. that's better in > terms of smaller code, even if it's then

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-17 Thread enh via Toybox
funnily enough i was reading the POSIX vi documentation the other day because i was curious to know (a) how much of my personally-known vim subset is actually in POSIX vi and (b) what's in POSIX vi that i don't even know about. and it turns out that the POSIX vi docs [https://pubs.opengroup.org/onl

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-17 Thread Jarno Mäkipää
Yeah even tho Rob didint have ex in roadmap, it has started to be more clear that it is needed for testing purposes. Shame that I dont know mostly any of the commands, I only use r, w, s//, absolute jumps with numbers, and few set variables... ex mode command launcher should be rewritten to parse

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-16 Thread enh via Toybox
On Tue, Jan 14, 2020 at 11:05 PM Jarno Mäkipää wrote: > > Hi > > On Wed, Jan 15, 2020 at 12:23 AM enh via Toybox > wrote: > > > > ^D is the opposite of ^U in vi (the ^D/^U pair is the half-screen > > version of ^F/^B). ^C is unbound in vi. It's pretty surprising for these > > to cause toybox vi t

Re: [Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-14 Thread Jarno Mäkipää
Hi On Wed, Jan 15, 2020 at 12:23 AM enh via Toybox wrote: > > ^D is the opposite of ^U in vi (the ^D/^U pair is the half-screen > version of ^F/^B). ^C is unbound in vi. It's pretty surprising for these > to cause toybox vi to exit, and it's annoying as long as toybox vi > unconditionally exits r

[Toybox] [PATCH] vi: don't exit on ^C or ^D.

2020-01-14 Thread enh via Toybox
^D is the opposite of ^U in vi (the ^D/^U pair is the half-screen version of ^F/^B). ^C is unbound in vi. It's pretty surprising for these to cause toybox vi to exit, and it's annoying as long as toybox vi unconditionally exits rather than checks whether there are unsaved modifications! (I'm tempt