Note to self: An easier way to pick fonts and get their values with VIm, from jsouthwo posting to VIM's GitHub forums:

I'm usingย Source Code Proย from Adobe on Windows 7 in GVIM 7.4, and prefer the ExtraLight version of the font.

If I doย :set guifont=*ย and selectย Source Code Proย as the font andย ExtraLightย as the font style, everything looks fine. The output ofย :set guifont?ย isย guifont=Source_Code_Pro_ExtraLight:h14:cANSI.

However, if I putย guifont=Source_Code_Pro_ExtraLight:h14:cANSIย in myย vimrcย or run it within GVIM, the font displayed is Source Code Pro Regular, not ExtraLight. The output ofย :set guifont?ย is stillย guifont=Source_Code_Pro_ExtraLight:h14:cANSI.

So hit :set guifont=* to get a selection screen like this...

vim font selector

... and then set guifont? to see what's selected.

set guifont? results

... and type that into your vimrc and profit.


Oh, in other news, to move lines up and down easily with alt-j and alt-k, add this to your vimrc:

nnoremap <A-j>ย :m .+1<CR>==
nnoremap <A-k>ย :m .-2<CR>==

Labels: , ,