[TriLUG] vi(m) #1 of the top ten linux tools admins should know/have

Pat Regan thehead at patshead.com
Wed Nov 2 16:28:16 EST 2005


Jon Carnes wrote:
> On Wed, 2005-11-02 at 14:41, Pat Regan wrote:
> 
>> 
>> Why vi specifically instead of "a text editor?"
>> 
> Well "vi" is not a gui editor and it's not simply a text editor. Its
> command syntax is used in multiple Unix/GNU apps - especially those
> designed to work from the command line.
> 

I'm not exactly sure where you got the idea that I suggested any sorts
of GUI text editor.

What command line tools exactly do I need to use vi key binding for?
Everything I use can use emacs bindings just fine, and most things work
quite well with just arrows/backspace/delete.

>> People don't know vi because they don't need to.  There really is no
>> excuse for any modern UNIX to not include a simple text editor that an
>> average person could sit down and actually use.  Lots of people like vi.
>>  Lots of people like Emacs.  Nobody should be told they need to learn
>> either one just to edit simple text file in /etc.
>> 
> Spoken like someone who doesn't *know* vi!
> 

I "know" enough vi to do basic text editing.  Personally, I would rather
be stuck with Nano than vi :).

>> Why exactly don't the big old school UNIXes ship with something
>> self-documenting like Nano, with all the important commands listed at
>> the bottom of the screen?
>> 
> The world was not always as it is today. Computers were not always as
> large and full of HD space as they are today. GUI editors don't always
> perform locking functions as well as they ought to (at least when
> editing as root and modifying configuration files...)
> 

Fortunately, at least in many ways, the world is very different than it
was yesterday.  We have oodles of disk space and memory.  Does that mean
we should waste it all?  Probably not.  But I don't think the couple of
hundred extra KB an easier to use text editor would take up is asking a lot.

I don't really want file locking in a text editor.  I would much prefer
what Emacs tells me when I try to save.  That the file on disk has
changed since I opened it.  Nano does not seem to fit the bill here, but
I cannot think of a text editor that would be easier for a newbie to use.

> Of course the wheel of life brings things around again and again. Today
> we work on Linksys routers and mini-application specific hardware bots
> that have very limited space and RAM. You can either modify the images
> and then reload them... or work within the limited space and RAM
> available to make your modifications directly on the box.
> 

My Linksys box here runs vi that is in busybox.  I would imagine if the
busybox folks wanted to implement a Nano-alike it would probably have a
memory/disk footprint similar to their implementation of vi.

> In an environment like that, vi is king!

To tell you the truth, I am very surprised we get a text editor at all
in an environment like that :).

What is the excuse for Solaris to not ship with a self documenting text
editor in the default install (maybe they do now, I am a bit outdated as
far as Solaris goes)?  Only having an obtuse editor like vi really puts
a lot of people off.

I don't think the first thing a person needs to learn should be how to
operate a text editor.  Especially since they could intuitively use a
different one.

Pat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: OpenPGP digital signature
URL: <http://www.trilug.org/pipermail/trilug/attachments/20051102/f8d8d10c/attachment.pgp>


More information about the TriLUG mailing list