[patch] vi: add 3 commands: '_' ',' and gg for vi

Leo Jay python.leojay at gmail.com
Wed Feb 13 08:57:51 UTC 2008


On Feb 13, 2008 6:45 AM, Paul Fox <pgf at brightstareng.com> wrote:
>  >
>  > hello,
>  >
>  > i added 3 commands for vi:
>  > _           cnt - 1 lines downward, on the first non-blank character
>
> i think you may be the first person i've ever met who uses this
> vi command.  i assume you only use it as an operator motion, e.g.
> "d_", correct?  can i ask why you don't just stutter the action
> part, i.e. "dd"?  when i wrote vile, i didn't even bind '_'
> (initially out of ignorance), but never had a complaint.  (it
> does something else entirely in vile, and i'd gotten used to that
> behavior by the time i found out it was a real command, and refused
> to change it.)

sorry, i don't use that either. just wanted to make vi more comprehensive.

>
> in any case, can't '_' be more easily implemented as a
> fall-through into the carriage return ("case 13") and '+' cases,
> with a pre-decrement of the argument?

no.
'+' has a handcoded moving to next line (dot_next()), but not all '_' command
need so.

>
>  > ,           repeat latest 'f' in opposite direction
> this is fine.
>
>  > gg        goto a line number (default= first line in file)
> this is a vim-ism.  what's wrong with 'G' (and "1G")?

yep,
nothing wrong with 'G', i just get used to 'gg', and thought some
people may need it.

>
>  >
>  > i don't know if the vi is still open for additional commands.
>
> i'd rather you implemented "undo".  ;-)
>
> paul
>
>

-- 
Best Regards,
Leo Jay



More information about the busybox mailing list