I wanted to add a UTF-8 font in Gvim but I could not find out how to do this. I tried to follow the step on this manual but it still did not work. http://www.inter-locale.com/whitepaper/learn/learn_to_type.html (vim section halfway the page)
Can anyone tell me how to add a font in Vim so I can have Japanese characters displayed ?
On Windows 10, I had to add this line to _vimrc in user home directory to make font setting persistent: (Default set to Consolas size 10).
As others note, you must use a fixed-width font. Vim is a text editor, not a WYSIWYG editor.
If you have a fixed-width font with the characters you need then:
:set guifont=*
Select the font you want to use, the size, etc. Once you're happy with it, do:
:set guifont?
And it will output the current setting of the value. Put the set guifont=foo
in your .gvimrc
(or in .vimrc
with a if has("gui_running")
block).
set guifont=<C-R>=&guifont<CR>
That will put the current value into the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With