Vim in Windows

Santiago Agüero
Feb 12, 2015 · 2 min read

This is my (ongoing) story about Vim in Windows. Yeah! Vim in Windows!

This is going to be question & answer, highlighting those things that I consider important to take into account.

Let’s start!

Where should I obtain Vim for Windows?

Of course, the easiest answer is just grabbing the binary from official vim site. This should be fine if you don’t want to have the latest version with all the patches included. In addition, consider that console vim doesn’t include python/ruby/lua bindings (thanks @sudo-bang-bang for your comment!)

Since I want to use the latest version without compiling it, I’m required to search for another Vim binary. To date, I recommend one of the following alternatives:

The main difference is that the former is built using Visual Studio whereas the latter is built using MinGW-w64.

Remember that you can always compile Vim from scratch. You can follow the instructions from here or there.

In the end I just stuck with solar-blogg x64 build as in my case it works better (discussion about performance can be found in this reddit post.)

Graphical Vim vs Console Vim

You might be wondering if Console Vim in Windows is possible and has benefits.

For Graphical Vim I’m referring to gvim, nothing new here, just open it and you can use it as you’re accustomed to.

For Console Vim I’m referring to vim. Try opening it in a windows console, you should see something like this:

So, yeah… it works but it doesn’t look quite good! Moreover, if you want to have a fullscreen console window you will have to use weird hacks like this.

We can do better than that. There is a simply and powerful solution and that would be to Get rid of windows console and embrace cmder.

Once you install cmder, just open up vim. Try your favorite colorscheme like badwolf and… voilà!

Isn’t it awesome?

If for any reason this does not work for you, it might be because some settings are missing in your .vimrc (reference)

set term=xterm
set t_Co=256
let &t_AB="\e[48;5;%dm"
let &t_AF="\e[38;5;%dm"

We’ve seen different Vim distributions available for Windows; we did a comparison between using Graphical vs Console Vim. This is all you need to start using Vim in Windows.

In future posts I’ll surely delve into things like How to efficiently use Vim plugins in Windows, Some tweaks and workarounds in Console Vim, Take advantage of Python support and so on.

Santiago Agüero

Written by

A blog with things I’m passionate about

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade