I was looking for a way to easily find an Unicode value for a character in Vim.
The solution is actually quite trivial, move the cursor on a char and write ‘g8′ you should see the UTF-8 value for this char.
For example with a left curly bracket ‘{‘ Vim displays ’7b’ which results in U+007B.
It is also possible to use ‘ga’ to get the decimal, hexadecimal and octal value of a string.
How to find the unicode value of a character ?
Unicode characters are commonly referred to using a notation like
U+nnnn where nnnn is a four-digit hexadecimal (base 16) number specifying the code position of the character in Unicode. For example, the space character has the same code number in Unicode as in ISO 8859-1, namely 32 decimal, 20 hexadecimal; thus, it can be denoted asU+0020. Generally, a notation likeU+nnnn is needed for referring to characters uniquely in contexts where one cannot reliably present the character itself.
Useful links












