Re: [Toybox] [PATCH] vi.c: line ranges, fixed line gotos, CTRL-D, etc

2023-10-01 Thread Rob Landley
On 10/1/23 13:33, Jarno Mäkipää wrote: >> A lot of ex commands don't necessarily do movement, 's' for example for >> example shouldn't >> effect cursor position. If a "counter" (Line range) is given, it loops >> through the line range >> and executes the command for each line before going down

Re: [Toybox] [PATCH] vi.c: line ranges, fixed line gotos, CTRL-D, etc

2023-10-01 Thread Oliver Webb via Toybox
--- Original Message --- On Sunday, October 1st, 2023 at 1:33 PM, Jarno Mäkipää wrote: > On Sun, Oct 1, 2023 at 6:30 PM Oliver Webb aquahobby...@proton.me wrote: > > > --- Original Message --- > > On Sunday, October 1st, 2023 at 7:50 AM, Jarno Mäkipää jmaki...@gmail.com > >

Re: [Toybox] [PATCH] vi.c: line ranges, fixed line gotos, CTRL-D, etc

2023-10-01 Thread Oliver Webb via Toybox
--- Original Message --- On Sunday, October 1st, 2023 at 7:50 AM, Jarno Mäkipää wrote: > Hello Oliver > > ex mode command parsing is not something that has been designed > carefully. Its more of hack to accept write file and exit commands in > order to make editor somewhat usable.

Re: [Toybox] [PATCH] vi.c: line ranges, fixed line gotos, CTRL-D, etc

2023-10-01 Thread Jarno Mäkipää
Hello Oliver ex mode command parsing is not something that has been designed carefully. Its more of hack to accept write file and exit commands in order to make editor somewhat usable. Even the vi mode command execution is not very good. At least one issue is that it has function dispatch table

[Toybox] [PATCH] vi.c: line ranges, fixed line gotos, CTRL-D, etc

2023-09-30 Thread Oliver Webb via Toybox
Heya, I have been working a few days on vi.c and have managed to add a few things. I have a barely-working version of the "g" command which I have ultimately decided to omit from this patch. First thing I added was line ranges, the ability to specify stuff like "10,45d" and have it delete lines