Change default editor
January 14th, 2007
There is a quick way to change your default editor, whichever you want.
First open up a terminal by going to Applications > Accessories > Terminal (in Ubuntu) or press Alt + F2 and type in terminal. Now that you have a terminal open, let’s get down to viewing your history.
Open up .bashrc by typing:
[bash]
gedit ~/.bashrc
[/bash]
Now to change your bash default editor find
[bash]
export EDITOR
[/bash]
However, if you can’t find that, just add this to the top.
[bash]
export EDITOR=gedit
[/bash]
Personally I like gedit. You can use pico (/usr/bin/pico), nano (/usr/bin/nano), or any other editor you like.
Like always, you can learn more about this by doing the following:
[bash]
man bash
[/bash]
[...] Original post by tech.karbassi.com [...]
use VISUAL for the gui version and EDITOR for a tui version…
e.g.
export EDITOR=vim
export VISUAL=gvim
use VISUAL for the gui version and EDITOR for a tui version…
e.g.
export EDITOR=vim
export VISUAL=gvim