I just got my Raspberry Pi up and running on Raspbian, and was finding nano, the pre-installed text editor a bit lacking. I’ve been using Emacs since college, and decided to get it up and running on my Pi. It turns out that it’s quite simple to install GNU Emacs:
$ sudo apt-get install emacs
If the above command fails and complains of missing packages, try
$ sudo apt-get upgrade
and then retry installing emacs (thanks to Tom Sargent for this tip).
Emacs users typically prefer their ctrl keys to reside where the Caps Lock key typically resides on most PC keyboards. To swap the left Ctrl and Caps Lock keys, edit /etc/default/keyboard, and find the line XKBOPTIONS line. If it’s currently empty, just replace it with
if the line already has some other options in it, simply separate the options with a comma, e.g.:
To make the change effective, type:
$ sudo dpkg-reconfigure -phigh console-setup
They keyswap will persist across reboots, and works in both virtual text consoles, and X-windows.