0

i am using NANO as my everyday text editor. I'm using an old laptop, so NANO it's fast, lightweight, and saves me battery. The only problem is the fact i can't use Special Characters and accents.

For example, as i am from Brazil, i need to use some everyday-accentued-portuguese-characters: à, á, Ç, ç, ó, ô, õ, ã, â...

Is there any way i can enable it?

To make õ be printed if '~' + 'o' is pressed, or ü if '¨' + 'u' is pressed...

Thank you :)

2
  • My laptop have ubuntu, and i am using a terminal emulator.
    – ghaschel
    Sep 27, 2012 at 14:24
  • it suddenly started to work properly. I will mark as answer the first answer by "oldest"
    – ghaschel
    Sep 27, 2012 at 16:57

3 Answers 3

1

Check you keyboard layout, maybe with the help of right-alt you have the characters.

Here are tips from about.com: http://spanish.about.com/od/writtenspanish/a/dia_ubuntu.htm

1
  • Right alt. I'll try it today. But it would be great if it was easier to access them, like ´ + a = á Thx =)
    – ghaschel
    Sep 27, 2012 at 14:32
1

If you're just using a terminal emulator (terminator/gnome-terminal/etc) you can still use the Compose-Key combinations.

And/or if you're using a TTY and these keys are keys you have on your keyboard, you might just need to set your keyboard up correctly:

sudo dpkg-reconfigure keyboard-configuration
4
  • I Know about the Compose-Key combinations. They do not work on nano. If i'm on chrome, and i type ´ + a it returns me á, but if i type it on nano, it returns me ´a
    – ghaschel
    Sep 27, 2012 at 14:27
  • What sort of terminal are you in? It works here in both Gnome Terminal and Terminator.
    – Oli
    Sep 27, 2012 at 14:40
  • Gnome-terminal. I have not read about the right-alt key. I will try it today. It would be inpractical to press right-alt to every special character =(
    – ghaschel
    Sep 27, 2012 at 14:44
  • My compose key works in Nano. What desktop are you using? I'm using Cinnamon (on Xubuntu 22.04), with Nano 6.4, which I compiled myself. Oct 5, 2022 at 6:48
0

While compose keys should work (I understand they're not working for you), there are other ways.

You can try pressing shift+ctrl+u and then typing the code for the Unicode character.

Alternatively, you may be interested to know that there are some special combining Unicode characters that act kind of like compose keys in and of themselves (with no special software requirement, other than Unicode). So, if Unicode works on your version of Nano, all you have to do is insert one of those characters in Nano, and use it according to your desires.

So, for example, you might go in your ~/.nanorc file and create keybindings for those special characters.

For example, if you put this line in your .nanorc file, you can type a vowel and then press F2 to put a macron on the vowel (I tested it on Nano 6.4 and it worked):

bind F2 "̄"

Here are the codes for some of the combining characters that you probably want (look them up on a character map or make them with shift+ctrl+u and typing the code):

  • U+0300 (Grave accent)
  • U+0301 (Accute accent)
  • U+0302 (circumflex accent)
  • U+0303 (tilde)
  • U+0304 (macron)
  • U+0305 (overline)
  • U+306 (breve)
  • U+0307 (puts a dot on top)
  • U+0308 (diaresis/umlaut)
  • U+030A (ring above)
  • U+3011 (inverted breve)

You might not be satisfied with F2, so you should probably look at how to rebind keys yourself in the Nano documentation:

https://nano-editor.org/dist/latest/nanorc.5.html#REBINDING%20KEYS

I recommend updating your Nano version, if it's old. To do that, you can compile it yourself pretty easily. Enable the source code repositories for Ubuntu in your software settings. Then type sudo apt build-dep nano. Then download the Nano source code from nano-editor.org. Then it should compile without problems, according to the instructions in the readme found in the source code.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .