easy VI
Home Firmware tools memory stick Busybox easy VI Packages Miscellaneous Update Upgrade Error: killed Slug 2010 Beyond NSLU2 Contents Site home

 

"Easy VI" or tips on using the Busybox VI text editor

I can't get to grips with vi properly.

These are the few commands I understand:

Cursor keys These work as expected
Delete don't press this
i "insert" mode
escape leave insert mode
dd delete whole line
x delete character
:q quit
:wq save and quit
:q! don't save but quit anyway

I can just about get by with the above, however I've noticed a tendency for the file contents and the terminal display to get out of step. Usually the file is correct but the screen is wrong so anything that forces a refresh solves it. Usually I quit and re-enter vi to fix it.

The problem I'm seeing occurs in the busybox vi whenever I try to insert into existing text. There is a work-around which is to move the cursor right then left before typing.

Also note that busybox vi appears to crash after prolonged use.

There is an alternative to vi called "vim" short for vi-improved. Vim does not show the above problem but it appears to have the limitation that you cannot use cursor keys while in insert mode.