[BusyBox] vi applet for busybox and wishlist

Sterling Huxley sterling at europa.com
Fri Apr 6 06:23:15 UTC 2001


On Wed, 4 Apr 2001 12:24:22 -0600 Erik Andersen <andersen at lineo.com> writes:
I did find a few problems: 
    - Hit ":" then hit Esc and you are not returned out of ex mode.
	You have to hit enter to get out.
Fixed.
    - The "u" undo command does not undo the result of "P" or "p"
There is no real little-u undo.  There is a Cap-U undo.  The cap-U command
just restores the current line to its original text when you move onto that
line.  Little-u is currently and alias for Cap-U.  A real little-u undo
feature seemed too byte-wise expensive. I think I should make little-u
a "Not Implemented" command so users dont get confused.
    - Hit "dd" then hit "u" and it will restore the deleted line over the
        top of the current line, rather then re-inserting a line.
All "delete" command save the deleted text in an internal tempory "cut"
buffer.  After the "dd" you can do a "p" or "P" to put that temp "cut"
buffer text back where ever the cursor is.  Not quite as nice a "u" but
it re-uses the current cut/paste code.
    - ":e /etc/profile" does not work, but ":e cat.c" does (i.e. ":e" only 
        works for files in the current directory.  Same applies to ":r")
Oops, bug. Fixed.
    - "cc" deletes the current line like a "dd" instead of clearing it and 
        letting you rewrite it in place.
Yes, This was quick&dirty mis-implemented. Fixed.
    - "d^", "y^" etc do not work, though "d$" and "y$" do.
Yes, something is broken. I will find it.

Some wishlist items.
    - I often use G to go the EOF, so that is missed
Done.
    - It would be nice if hitting "Insert" twice would invoke "R" as in vim
Done.
    - Having ":! <foo>" and ":r !<cmd>" work would be nice
Partially Done.  The ":!date" is done.  ":r !ls" and the "!" filter command
will be put on the TODO list.
    - M would be nice (since you have H and L)
Done.
    - ^R would be nice (since you have ^L anyways)
Done
    - It might be nice to call show_status_line() after each
	movement (arrows, hjkl) or searching routine.
	This is not traditional vi behavior though....
I hesitate on this one.  When vi is running on a video card this
would not be a problem.  If it is running over a serial link all the extra
chars could really be annoying.  Larry already wants faster re-paints :-)
    - % would be nice (can use the sed code here -- possible moving
	part to libbb?)
This command is already in there. Are we talking the same thing?
"%" is the command that says go to the matching char of a pair.
In Vim, the legal pairs are (  ),  {  },  [  ]. but not < >. This should work.
    - Now the big one -- it would be very cool if your could hook into
	cmdedit.c and use that for ex mode.  I havn't thought through
	all the issues involved, but the result would be very cool.
I had never thought of this. It would be nice. I will look into it.

I will send out a patch for these bug fixes and enhancements shortly.

Sterling





More information about the busybox mailing list