How to change default editor in Ubuntu Linux Mint Debian or any other distrubutions

Welcome and Thank you for your support!
Support this website by leaving Comments

1.VIM – As I prefer Vim always! 🙂

ami@amios:~$ which vim
/usr/bin/vim

ami@amios:~$ export EDITOR=/usr/bin/vim

OR do it by .bashrc

ami@amios:~$ echo “export EDITOR=vim” >> ~/.bashrc
ami@amios:~$ cat .bashrc | grep vim
export EDITOR=vim

Yes 😉

check your env (environment variables)

root@amios:/home/ami# env | grep EDITOR
EDITOR=/usr/bin/vim

2. Nano editor

export EDITOR=”nano”
export VISUAL=”nano”

3. Other options

update-alternatives –config editor

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s