3

I am trying to enter a latin cross (, Unicode 271d) into a document. I can't find a pre-defined digraph for this. I am able to enter such a character with <ctrl-v>u271d or I can define a new digraph in my .vimrc like so: digraph \|- 10013.

But before I'd do that I'd like to know if there is really no pre-defined digraph for the latin cross. How can I verify this?

5

You can use the :digraphs command to get a list of all defined digraphs. This isn't very easy to search, but we can use :redir to store it to a file:

:redir all_digraphs
:digraphs
:redir END
:e all_digraphs

And we can now search the file:

/<C-v>u271d 

which gives us:

E385: search hit BOTTOM without match for: ✝

which confirms that this characters isn't a pre-defined digraph.

| improve this answer | |
3

There is no such digraph defined by default. You can review available digraphs at :help digraph-table. The listing includes hex and decimal values as well as the name of the character, so you can easily search for an entry, for instance with :help digraph-table|/0x271d or :help digraph-table|/CROSS. The closest ones I see by value are

✓   OK  2713    10003   CHECK MARK
✗   XX  2717    10007   BALLOT X
✠   -X  2720    10016   MALTESE CROSS

and I suppose the closest one visually is

†   /-  2020    8224    DAGGER
| improve this answer | |
2

I made the unicode plugin that helps with finding digraphs. You can use the command :Digraphs cross to search for a digraph whose name contains cross. Or when on the char, issue the command :Unicodename and it will output the digraph for that char. There are other similar commands as well, so check the help.

| improve this answer | |

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.