> Thank you very much,now i'm getting to the point.I
> known about cat less etc,but i didn't understand the
> relation between vi and ksh,now as i said i'm quite
> close thanks indeed

ksh has different command-line editing modes, that resemble
popular UNIX text editors:

emacs
gmacs
vi
viraw

The first two are the same except that that in emacs mode, ^T transposes
the current character with the next character, and in gmacs mode, it
transposes the two previous characters.

For systems like Solaris that support an alternate end-of-line character,
vi mode and viraw mode should behave pretty much the same (unless maybe
you're using a KEYBD trap; if you don't know what that is, you probably aren't).

AFAIK, both emacs/gmacs mode and vi (or viraw) mode of command-line
editing support tab completion (and history searching).

Please read the ksh (or maybe ksh93) man page, which spells out all this stuff.
Warning: it _is_ long, so you may want to run

man ksh | col -b >/tmp/ksh.man

and then read the file with your favorite editor, rather than with a pager
like "more" or (better) "less".

Many people find emacs mode more friendly than vi mode, since it behaves
more like DOS command line editing (no input vs command mode).  That
is especially true with older versions of ksh, where the arrow keys don't
work in vi mode (I think they may work in newer versions).

Choosing which to use:

* -o _name_         where _name_ is emacs, gmacs, vi, viraw
* VISUAL environment variable naming an editor ending in emacs or vi
* EDITOR environment variable naming an editor ending in emacs or vi

The first of those that applies takes precedence.
-- 
This message posted from opensolaris.org
_______________________________________________
opensolaris-help mailing list
opensolaris-help@opensolaris.org

Reply via email to