Muffinresearch Labs by Stuart Colville

Ubuntu: change editor globally | Comments (1)

Posted in Code, Linux/Unix on 7th October 2008, 6:43 am by Stuart

I found the update-alternatives on my travels and very handy it is too especially when on a bytemark box by default the editor is set to “joe”. From the man page:

update-alternatives creates, removes, maintains and displays information about the symbolic links comprising the Debian alternatives system.

It is possible for several programs fulfilling the same or similar functions to be installed on a single system at the same time. For example, many systems have several text editors installed at once. This gives choice to the users of a system, allowing each to use a different editor, if desired, but makes it difficult for a program to make a good choice of editor to invoke if the user has not specified a particular preference.

Debian’s alternatives system aims to solve this problem. A generic name in the filesystem is shared by all files providing interchangeable functionality. The alternatives system and the system administrator together determine which actual file is referenced by this generic name. For example, if the text editors ed(1) and nvi(1) are both installed on the system, the alternatives system will cause the generic name /sw/bin/editor to refer to /sw/bin/nvi by default. The system administrator can override this and cause it to refer to /sw/bin/ed instead, and the alternatives system will not alter this setting until explicitly requested to do so.

To change the editor

sudo update-alternatives --config editor

There are 8 alternatives which provide `editor'.

  Selection    Alternative
-----------------------------------------------
*         1    /usr/bin/vim.tiny
          2    /bin/nano
 +        3    /usr/bin/joe
          4    /usr/bin/jmacs
          5    /usr/bin/jstar
          6    /usr/bin/jpico
          7    /usr/bin/rjoe
          8    /usr/bin/vim.basic

Press enter to keep the default[*], or type selection number: 

Done!

Post Tools

Comments: Add yours

1. On October 7th, 2008 at 12:46 pm Pages tagged "ubuntu" said:

[...] bookmarks tagged ubuntuSite about ERP ! Ubuntu: change editor globally saved by 1 others     PikaPika2005 bookmarked on 10/07/08 | [...]







XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>



Using Loggerhead with mod_wsgi|(0)

Here’s a post I wrote over on the Project Fondue Blog about our use of Loggerhead with mod_wsgi under Apache. Loggerhead is the rather nice branch viewer for bazaar branches as used on Launchpad.net.

If you’re not already subscribed to the Project Fondue blog feed then I can recommend it, as there should be some interesting posts coming out of there in the coming months (yes I’m unashamedly biased!).

Ubuntu: Turn off changing workspace with mouse wheel|(1)

I found the changing with the workspace with the mouse wheel really annoying. To disable it go to System => Preferences => CompizConfig (available if the compizconfig-settings-manager package is installed) and uncheck “Viewport Switcher” which is under the “Desktop” heading.

Photos on Flickr

© Copyright 2004-10 Stuart Colville, all rights reserved. May contain traces of Muffin. Powered by WordPress. Hosting by Slicehost.com This page was baked in 0.608s.