Reputation: 15967
How do I enter Unicode characters like 𝓭
without copying it to the clipboard and pasting it?
Things I know:
ga
on the character 𝓭
gives me hex:0001d4ed
."+p
.<C-v>u
for example <C-v>u03b1
gives the α
character.Upvotes: 38
Views: 14369
Reputation: 28954
There is a Vim feature designed to simplify entering characters that
cannot be typed directly. It is called Digraphs (see :help digraphs
).
To define a custom digraph for entering ‘𝓭’, use an Ex command similar to the one below.
:dig dd 120045
where 120045
is the decimal representation of ‘𝓭’, as one can easily
confirm using the ga
command.
Inserting a character using a digraph is simple:
Type Ctrl+K followed by the shortcut of that
digraph (dd
for the above example).
Upvotes: 13
Reputation: 15967
There exists a Unicode plugin for Vim. According to the plugin description, this plugin has three main features:
Upvotes: 6
Reputation: 11862
You can use <C-v>U
, that is, an uppercase u, to input an 8 digit hex codepoint character.
More information here and here.
Upvotes: 52