Inserting unicode characters into a document can be cumbersome, and for many people the default process is to do a quick web search to find the desired character, then copy and paste it into the document. Neovim provides built-in support for inserting unicode characters, if you already know the codepoint of the character you would like to insert.
To summarize, the steps are:
- Start in Insert Mode
- Hit Ctrl-V followed by
u
- Type the codepoint of the character you would like to insert
To demonstrate, suppose we created a simple shopping list, and just bought coffee so we want to insert a check mark to reflect that. We first need to move the cursor into position then check that line off:
Now that the cursor is in position, let's type s (substitute) which deletes the character under the cursor and enters insert mode.
Next, we hit C-V, followed by u and the Unicode code point we want to insert.
Finally, we can hit Esc to return to normal mode and continue editing.