vim change font

Change font

   Edit    Talk 0
1,605 PAGES ON
THIS WIKI
Tip 1587  Printable  Monobook  Previous  Next

created February 16, 2008 · complexity basic · author Metacosm · version 7.0

In gvim, you can change the font using the Edit menu, Select Font. An alternative is to enter the command:

:set guifont=*

Once you have a font you like, you want to make it the default in the future. Do

:set guifont?

and Vim will display something like

guifont=Lucida_Console:h11

Make a note of this string. Now put a line in your vimrc to set guifont to this value, like this:

if has('gui_running')
  set guifont=Lucida_Console:h11
endif

Note: If there is a space in the text printed, such as

guifont=Monospace 10

it will be necessary to escape the space

set guifont=Monospace\ 10

你可能感兴趣的:(vim change font)