When making a digraph, I can't seem use the ¨ symbol without getting an E39: Number expected. This error is there even when escaping it with a backslash.
Asked
Active
Viewed 262 times
2 Answers
1
If the digraph has a code point (usually found by a web search for unicode <character description>), you can just use <c-v>u#### to directly enter it. For example <c-v>u00e4 yields ä.
This does assume your editor can interpret the UTF-8 encoding.
Keith Prussing
- 121
- 4
-
The
unicode.vimhas a very useful:UnicodeSearchcommand. e.g.:UnicodeSearch smile. I think it also includes some useful digraph functions that may be helpful here (but I don't use digraphs do I'm not too familiar with it). – Martin Tournoij Jan 04 '17 at 15:48 -
That's an interesting project. I'll have to take a closer look when I have some down time. I normally use Unicode for the super and subscripts, but occasionally I'll need the digraphs for author names. – Keith Prussing Jan 04 '17 at 16:02
1
You can make it output a ¨ by putting 168 as the output symbol, i.e. with, say, :dig um 168, but not use inside a digraph itself (:dig a\168 228 still wont make <c-k>a¨ output ä.)
Even the predefined digraphs use : instead; e.g. <c-k>a: give you ä.
Wolfie
- 667
- 3
- 8
:digraphsappears to want two bytes rather than two characters. – Antony Jan 03 '17 at 23:19