Personal tools
You are here: Home cmgui Wiki Changing your default editor
Views
FrontPage >> Peters notes >> Cmgui nightly build >> Scheduling cronjobs >>

Changing your default editor

last edited 1 year ago by pbier

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.

Contributing to this site

Please add to the wiki any relevant information that you think might be useful to other users of this website. For example, you might like to contribute your experiences, questions and answers.

You are encouraged to contribute to this site regardless of your level of experience. Contributions are welcomed from new and regular visitors.

If you ask a question and receive an answer from a developer you should record it in the wiki. This information is extremely useful and can help other users overcome the same problem.

See how to add and edit pages for more information.