Thursday, May 7, 2009

How to change the default text editor in ubuntu!

In ubuntu , the default text editor for editing the configuration files may be nano. For eg: to set a cronjob crontab -e , the configuration file opens up with the nano text editor. But we can set the default text editor as our favourite editor by using a simple command.

update-alternatives -- config editor

once this command is entered, it asks to enter the no: of our favourite editor. eg:

humanlinux@localhost:~# update-alternatives --config editor

======================================

There are 3 alternatives which provide `editor'.

Selection Alternative
-----------------------------------------------
1 /usr/bin/vim.tiny
2 /bin/ed
*+ 3 /bin/nano
======================================

Just enter the corresponding no: of your favourite editor.
Here i have choosed 1.

======================================
Press enter to keep the default[*], or type selection number: 1
Using '/usr/bin/vim.tiny' to provide 'editor'.
======================================

thanks & regards
tell2humanlinux@gmail.com

No comments:

Post a Comment