Personal tools
You are here: Home / cmgui / Wiki / Changing your default editor
Log in

Forgot your password?

Changing your default editor

On unix based systems some programs will open up a file for you to edit (eg crontab). On many systems the default editor to use for these programs is vi (on ubuntu it is nano which is pretty easy to use). If you are unfamiliar with the vi editor it can be very difficult to edit your files. The one vi command you should know is how to exit vi, without saving changes. To do this press the ESC key and then type ':q!' followed by the ENTER key. Rather than learning vi, you may prefer to set your default editor to an editor you are more familiar with.

Your default editor will need to be one that can run within a terminal (ie text based rather than graphics based). I use emacs a lot, so if needed I set it to be my default editor by typing the following at a bash prompt:

export EDITOR='emacs -nw'

The '-nw' option stands for no window and runs emacs in the terminal. If you want to permanently change your default editor, add the export editor line to your '.profile' file.