How to change your standard editor
Everyone who is using linux knows that if you type editor in a bash shell an editor opens. But where can you change that editor?
Change the editor temporarily
Just execute the following on your shell:
export EDITOR=joe
Change the editor forever
Edit ~/.bash_profile and add the following:
export EDITOR=joe
April 26th, 2008 at 10:44 am
I get a command not found when I type editor on my PC
abresas@kepler ~ $ editor
bash: editor: command not found
I use Gentoo Linux. I guess this is also the same thing with the variable EDITOR defined in /etc/rc.conf:
# Set EDITOR to your preferred editor.
# You may use something other than what is listed here.
#EDITOR=”/bin/nano”
EDITOR=”/usr/bin/vim”
#EDITOR=”/usr/bin/emacs”