ExportEDITORAndVISUAL

HomePage | RecentChanges | EditorIndex | TextEditorFamilies | Preferences

For example:

In KornShell:

In the Bourne Shell:

EDITOR=vi VISUAL=vi

export EDITOR VISUAL

In the C Shell

If you want your favorite editor to be used by a mail program (or any other program), it is typically possible to either:

Under *nix, environment variables set in the login script are what controls what the system considers the default editor. The C shell login script is .login, a "hidden" file in the user's home directory. The Bourne and Korn shell's login script is called .profile. The login script is read when the user logs in, but not after unless specifically done from the shell. This can be done from the C Shell by "source ~/.login", and from the Bourne and Korn shells by ". ~/.profile". (~ will be expanded by the shell to the value for the full pathname for the user's home directory.)

"rc" files have a different purpose. While a sub-shell normally inherits the environment of its parent, some things are typically not propagated to sub-shells. rc files handle that case. They are read by the shell *every* time it is invoked, and can be used to set values not passed down form the parent to sub-shells. The C Shell uses a file called .cshrc. The Korn Shell uses .kshrc. Bash uses .bashrc.

Files on *nix beginning with a period are "hidden" -- they are not shown in a standard ls display. You must use "ls -a" to show them.

Look for these options.


HomePage | RecentChanges | EditorIndex | TextEditorFamilies | Preferences
Edit text of this page | View other revisions
Last edited July 18, 2012 3:10 pm (diff)
Search: