Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I add a font in gVim on windows system

Tags:

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 ?

like image 319
user18383 Avatar asked Oct 25 '08 00:10

user18383


People also ask

What is the default font in Gvim?

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).


1 Answers

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.

like image 120
Zathrus Avatar answered Sep 22 '22 15:09

Zathrus