WezM.net The weblog of Wesley Moore

23Sep/080

Pimping Vim on Windows

Following Nick Kreeger's handy post on tweaking MacVim on Mac OS X I applied some of the tips to GVim under Windows to make it a little easier on the eye. The following settings are placed in your _vimrc/.vimrc file.

First up is a change of font. With the introduction of Windows Vista Microsoft had a set of new standard fonts created. These also ship with the latest versions of Office. The Consolas monospaced font makes a good programmers font so I this as the font when running under Windows. I've also set the size to be relatively small.

if has("gui_win32")
    :set guifont=Consolas:h8,ProggyTiny:h8,Luxi_Mono:h12:cANSI
endif

Next up set the window to start tall and a little wider than normal:

set columns=90 lines=65

I share my vim config with Cygwin and Windows native vim. In order to get the Windows version to pick up the UNIX plugins etc in the .vim I include the following:

" Make Windows use my UNIX vimfiles
if has("win32")
    set runtimepath=$HOME/.vim,$HOME/vimfiles,$VIM/vimfiles,$VIMRUNTIME,$VIM/vimfiles/after,$HOME/vimfiles/after
endif

Turn on a custom status line which includes the file name, file type, modified and read only status, line and column numbers and the percentage through the file.

set laststatus=2
set statusline=%<%f\ %m%a%=%([%R%H%Y]%)\ %-19(%3l\ of\ %L,%c%)%P
set showcmd

Along the lines of what Nick did I turned line numbers on and toned the colour down a bit:

colorscheme koehler
hi LineNr guifg=#666666
set number

So what does it all like in the end? Still not as good as MacVim but not too bad (click for full size version, scaled version looks a bit average):

Screenshot of GVim on Windows after customisation

Related Posts

Filed under: Tips, Windows Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


Trackbacks are disabled.

Recent Comments

Categories

Links

Archives

Tags

adaptive atom awk bash benchmark books cake consolas core-audio debian decoder delivery expand feed font fonts git glob gripe installer iPhone ipod Linux mad melbourne microsoft mp3 mpg123 music package pocket-reference rss ruby script sed shell smoothing snow-leopard textmate title tux UNIX uri-scheme variable virtualbox

Meta

Contact