Changing your Mac OSX Terminal's default text editor

For just this session, simply type:
export EDITOR=emacs

(or replace emacs with vim, nano or whatever)

Personally, I like to use emacs on servers, but on my Mac TextWrangler is way more helpful. One of the great things about TextWrangler is that you can get it to magically pop edit requests out of the Terminal simply by installing it and typing "edit". To make all other programs use this method try:
export EDITOR="edit -w"

For a more permanent fix, add the same line to your .bashrc file. If you've not already got one of those, type:
edit ~/.bashrc


(The one exception is git, which you'll need to configure thus:)
git config core.editor "edit -w"

Comments

AlexS said…
http://stackoverflow.com/questions/7780030/how-to-fix-terminal-not-loading-bashrc-on-os-x-lion
Sometimes bashrc is missing. Link explains how to fix it

Popular posts from this blog

Installing LAMP Apache/MySQL/PHP on Chromebook/Chromebox

Installing Ubuntu Linux on your ChromeBox/ChromeBook