How to view UTF-8 Unicode characters in VIM
If your current locale is in an utf-8 encoding, Vim will automatically start in utf-8 mode.
If you are using another locale, set below in your user ~/.vimrc
file:
set encoding=utf-8
You might also want to select the font used for the menus. Unfortunately this doesn't always work.
Also you have this option to force encoding with :set fileencodings=utf-8
. You can find the documentation here
another solution is: In insert mode, press Ctrl-R ="\xe2\x82\xa9"
Enter in order to directly input UTF-8 characters using thier Hex Encoding.
the \xe2\x82\xa9
is Hex Encoding of ₩
(the currency symbol for North Korea) character.
ref: Vim documentation
Note: If you did the above configuration but still you were not able to see Unicode characters well or type, check in your Terminal or Console configuration if Character encoding
was set to UTF-8
.
Read also Special characters in Vim.