Ross van der Harst | Linux for the Blind: Nano Setup


Linux for the Blind: Nano Setup

The problem with using terminal text editors with Orca is that almost none of the information you need ends up getting vocalized but it will constantly vocalize information you have little use for. For this reason, it is necessary to choose a text editor where you can remove all the bells and whistles from the user interface. This is where nano shines. By simply running nano --zero you are able to run an instance of nano that hides all the elements of its interface. So there is no title bar, status bar, or help lines.

At the same time you can always get access to these elements with keyboard shortcuts. So if you need to be reminded what the name of the file is that you are working on, just press Alt-z to have Orca start reading it. When you are done, pressing Alt-z again will take it away and Orca will be quiet. Alt-n will toggle line numbering on and off and Ctrl-c will read information about your current line. These shortcuts give you the luxury of querying information about the file without having to be constantly barraged by the information.

Configuration

You don’t want to have to explicitly tell nano to hide all elements of the interface every time you launch it. To have nano launch in zero mode every time, we need to edit ~/.nanorc:

echo 'set zero' >> ~/.nanorc

Additionally, let’s change tabs to spaces and set the tab size to two spaces:

echo 'set tabstospaces' >> ~/.nanorc

echo 'set tabsize 2' >> ~/.nanorc

And if you would like to add colored syntax to make your code more legible for the sighted:

echo 'include "/usr/share/nano/*.nanorc"' >> ~/.nanorc

That is it. Nano should now work seamlessly with Orca.

Basic Keyboard Shortcuts

Ctrl-o:      Save file
Ctrl-x:      Exit nano
Alt-z:       Hide/unhide info bar
Ctrl-c:      Report cursor position
Alt-n:       Turn line numbers on/off
Alt-a:       Set/unset mark
Ctrl-k:      Cut
Alt-Shift-6: Copy
Ctrl-u:      Paste
Alt-u:       Undo
Alt-e:       Redo