Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

To indent a whole block of code in nano, after selecting it with alt+a, I have to press alt+{, which doesn't work on my german layout macintosh keyboard (and would be pretty annoying even if it did).

How do I change and customize nano's keyboard shortcuts?

share|improve this question
up vote 3 down vote accepted

The file /etc/nanorc contains some options that should allow you to customize the shortcuts used on the editor. Please note that this is a global config file and will modify the options for all users on your system.

Further details on the available options are given on the man nanorc page (the list is just too big to reproduce here):

enter image description here

It should be possible to keep the options localized only to your user by copying the system configuration file in to your user's home directory with

cp /etc/nanorc ~/.nanorc

and doing the modifications necessary there.

The configuration file on your home directory will prevail over the global settings one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.