1

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.

2
  • 1
    What keys are you entering exactly? Oct 7, 2016 at 1:10
  • Is your 'encoding' multibyte? :digraphs appears to want two bytes rather than two characters.
    – Antony
    Jan 3, 2017 at 23:19

2 Answers 2

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 ä.

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.

2
  • The unicode.vim has a very useful :UnicodeSearch command. 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). Jan 4, 2017 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. Jan 4, 2017 at 16:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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