Friday, November 5, 2010

How to Change the Default Command Line Editor in Snow Leopard

These are instructions to change your default command line editor in Snow Leopard.

  1. Create or edit a file in your home directory called .profile (make sure you include the ".") using TextEdit or the editor of your choice. Note that files beginning with a period are invisible in Finder, so to use TextEdit you may have to open it with Terminal using the following command:
    open ~/.profileIf you get the following error, the file does not yet exist and needs to be created:
    The file /Users/randomuser/.profile does not exist.
  2. Add one of the following lines to the file based on your preferred editor:
    • emacs:
      export EDITOR=/usr/bin/emacs
    • vi:
      export EDITOR=/usr/bin/vi
    • TextEdit (may have side effects):
      export EDITOR=/Applications/


Post a Comment