Vim Tips Wiki
Register
No edit summary
 
(html entities corrected)
Line 9: Line 9:
 
|rating=175/52
 
|rating=175/52
 
|text=
 
|text=
To enter german umlauts (or any other of those weired
+
To enter german umlauts (or any other of those weired characters) not available on your keyboard use 'digraphs':
 
characters) not available on your keyboard use 'digraphs':
 
 
 
   
 
In insert-mode type for example:
 
In insert-mode type for example:
 
 
   
 
CTRL-K "a
 
CTRL-K "a
 
 
   
 
CTRL-K ^e
 
CTRL-K ^e
   
 
which gives an 'ä' and 'ê' ('e' with a hat).
 
 
which gives an '' and 'e' with a hat.
 
 
 
   
 
You can also set the digraph option:
 
You can also set the digraph option:
 
 
   
 
:set digraph (or :set dg)
 
:set digraph (or :set dg)
 
 
   
 
With digraph option set you can enter
 
With digraph option set you can enter
 
 
   
 
" <BS> a
 
" <BS> a
 
 
   
 
^ <BS> e
 
^ <BS> e
 
 
   
 
which gives the same result.
 
which gives the same result.
 
 
   
 
To get a list of currently defined digraphs type
 
To get a list of currently defined digraphs type
 
 
   
 
:dig[graphs]
 
:dig[graphs]
   
 
For more information about defining and using digraphs refer to: {{help|digraph}}
   
 
For more information about defining and using digraphs refer to:
 
 
 
 
[http://vimplugin.sf.net/cgi-bin/help?tag={{urlencode:digraph}} :help digraph].txt
 
 
}}
 
}}
   
Line 73: Line 42:
 
A little supplement:
 
A little supplement:
   
German umlauts are: /, /, /, and moreover there is ''.
+
German umlauts are: ä/Ä, ö/Ö, ü/Ü, and moreover there is 'ß'.
   
 
These are CTRL-K plus:
 
These are CTRL-K plus:
a" resp A"
+
a" resp A"
o" resp O"
+
o" resp O"
u" resp U"
+
u" resp U"
ss
+
ss
  +
 
==== Examples: ====
 
#Ähnlich = similar
 
#Röhre = tube
 
#müde = tired
 
#Straße = street
   
 
==== Some french words: ====
-- Examples: --
 
 
#René - popular first name
�hnlich = similar
 
 
#Café - coffee house
R�hre = tube
 
 
#Ampère - French physicist, 1775 - 1836
m�de = tired
 
Stra�e = street
 
   
 
The 'e' with a hat (ê) is not german, it's french.
-- Some french words: --
 
Ren� - popular first name
 
Caf� - coffee house
 
Amp�re - French physicist, 1775 - 1836
 
 
The 'e' with a hat () is not german, it's french.
 
 
�l in Danish is beer.
 
   
 
øl in Danish is beer.
   
 
Joachim Hofmann (Schuttberg)
 
Joachim Hofmann (Schuttberg)
 
   
 
joachim.hof--AT--gmx.de
 
joachim.hof--AT--gmx.de

Revision as of 20:54, 11 September 2007

Previous TipNext Tip

Tip: #51 - Entering special characters

Created: March 15, 2001 1:52 Complexity: basic Author: Anonymous Version: 5.7 Karma: 175/52 Imported from: Tip#51

To enter german umlauts (or any other of those weired characters) not available on your keyboard use 'digraphs':

In insert-mode type for example:

CTRL-K "a 
CTRL-K ^e 

which gives an 'ä' and 'ê' ('e' with a hat).

You can also set the digraph option:

:set digraph (or :set dg) 

With digraph option set you can enter

" <BS> a 
^ <BS> e 

which gives the same result.

To get a list of currently defined digraphs type

:dig[graphs] 

For more information about defining and using digraphs refer to: :help digraph

Comments

A little supplement:

German umlauts are: ä/Ä, ö/Ö, ü/Ü, and moreover there is 'ß'.

These are CTRL-K plus:

a" resp A" 
o" resp O" 
u" resp U" 
ss 

Examples:

  1. Ähnlich = similar
  2. Röhre = tube
  3. müde = tired
  4. Straße = street

Some french words:

  1. René - popular first name
  2. Café - coffee house
  3. Ampère - French physicist, 1775 - 1836

The 'e' with a hat (ê) is not german, it's french.

øl in Danish is beer.

Joachim Hofmann (Schuttberg)

joachim.hof--AT--gmx.de , August 4, 2002 14:13


The examples given have the key sequences reversed.

As Joachim says, you enter a : for umlauted "a", not : a. This applies to both Ctrl-K and digraph mode entry.

blaine.simpson--AT--admc.com , April 28, 2004 9:18


Both the original entry here and Joachim say to enter the letter to umlaut and " (double-quote). For my version of vim at least, you use colons not double-quote, as you can clearly see by giving the ":dig" command.

umlauted a = a:, either Ctrl-K a : OR a <BS> : (latter if digraph mode is on).

blaine.simpson--AT--admc.com , April 28, 2004 9:25


alt+d seems to give me an ae too...

Anonymous , September 25, 2004 7:25


I entered the set digraph command. How do you get it to work with <BS> syntac

angel.sosa--AT--nationalcity.com , June 15, 2005 8:59