> Okay, once more for us idiots, straight and to the point.  does another
> editor come with all the distros, if so, what string of text makes it come
up?
There's no hard and fast rules as to what comes with any distro, but the
following are pretty safe bets:
* ed - there's probably ed floating around somewhere in most default
installs.  However, it is seriously evil (think EDLIN - or, if you hafve an
expensive counsellor, don't, it'll save you a lot of money).
* vi - a full-screen ed, more powerful than DOS's EDIT, but uglier and more
mystifying.  This is my preferred editor, but I won't enter into any holy
ways unless I see someone come up with 'stay away from vi, it is the root of
all evil!' (or worse, someone who calls it 'six').  May also be elvis, vim,
or something similar - if a vi-clone is installed it'll be linked to vi.
* pico - probably on either the default or as an option in most distros.
>From what I remember of it, sort of DOSish, but not too nice.
* jed - see pico.
* jove - see pico.
* awk/sed - command line text processors (sort of) - don't touch unless
you're into BDSM.
* emacs - most of the time an option.  In console mode, hideously complex
and confusing at first.  In X mode (or XEmacs), hideously complex and
confusing at first.  But with X you have a menu bar and scrollers.

To start any of these, enter the name of the editor at the shell prompt.
It's usually OK to follow them with a filename or filespec.

Knowing vi (or at least the basics of vi) is something that'll come in handy
again and again and again.  As it's on nearly every system, knowing the
following is useful:

INVOCATION: vi <filename> (e.g. vi .bashrc, vi /etc/sendmail.cf, vi *.txt) -
will start up vi (or a vi-clone in true vi mode) with the first file
specified on screen.
CURSOR MOVEMENT: Usually the cursor keys are functional.  I think hjkl will
move the cursor left/up/down/right if the cursors are not mapped.  PgUp and
PgDn often work too.
EDITING: Hit ':i' to switch to insert mode, and type.  When done, hit Escape
a couple of times (once should be enough, but I always hit it two or three
times just to make sure...).
SAVING/CLOSING/EXITING: To save changes, hit ':w'.  (If the file was
read-only, ':w!' will force an overwirte, but that's usually Bad VooDoo).
To close the current file and move onto the next (if you specified multiple
files on the command line), use ':n'.  If you haven't saved changes you see
an error - use ':n!' to discard the changes, or save and then move onto the
next file.  To finish with vi, use ':q'.  If you're editing the last or only
file specified and you haven't made unsaved changes, you're outta there.  To
force an exit if you either want to discard changes or want to ignore the
rest of the files, use ':q!'.
SEARCHING FOR TEXT: This is '/searchstring/' and then '/' to find again.
Searchstring can also be a regexp.  Ignore regexps for now.  To search and
replace, 's/original/replacement/'.  Again, regexps possible.

This covers the very basics of vi.  It's enough to get by - I can't recall
any occasion where I've needed anything else.  BTW, the searching commands
also work in 'less' (maybe 'more'), which is used when you view a manpage.

Regards,
Ben A L Jemmett
(http://web.ukonline.co.uk/ben.jemmett, http://www.deltasoft.com)

To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with 
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.

Reply via email to