Tag Archives: Tools
Installing an Optimal Vim Experience on Windows

Vim

I’m assuming you’d rather not compile Vim for Windows yourself. I don’t blame you. I tried it and it’s a nightmare.

These are manual steps, unfortunately. 🙁

For the best vim experience you should get the version compiled with Ruby and Python support.

Ruby and Python support does not necessarily mean that you will be coding in Ruby or Python, but many of the plugins that you will want to use require vim integration with Ruby and Python.

These instructions assume you are working in a Powershell console and that Chocolatey is installed.

Install Ruby

choco install ruby -Version 2.0.0.59800

If you need other version of ruby, go ahead and install them now.

Uru

You only need to install uru if you are using multiple rubies. Rvm does not work on Windows and Pik is no longer supported. Uru works fine.

Install Uru

You’ll need to add your ruby installations to uru using

uru admin add /path/to/ruby/bin

Installing Python

choco install Python2

Install Vim

Now you are ready to install vim.
Unfortunately, the version available on Chocolately.org is hard to get to work with Ruby and Python on Windows.
However, Alexander Shukaev (Haroogan) has compiled a version that works nicely.

Download Vim from Here

Extract the zip file where you want it and make sure the location of vim.exe is in the path before any other vims on your system (for example, if you have msysgit installed).

Verification

If this works, you should be able to execute the following commands in vim.

:echo has('ruby') => 1
:echo has('python') => 1

Install .vimrc

I keep my .vimrc file as a gist.

I clone it into my C:\git directory.

git clone https://gist.github.com/crmckenzie/4913add34cd30abd4b93 vimrc

Then I create a symlink from my $HOME directory to the vimrc file. This allows me to maintain the file across machines using git as a synchronization tool.

From powershell

cmd /C mklink .vimrc C:\git\vimrc\.vimrc

The “cmd /C” section is necessary in Powershell because not all cmd.exe commands have been ported yet.

Install Vundle

Vundle is a package manager for Vim. It uses github as a package source. This is about as easy as it gets 🙂

git clone https://github.com/gmarik/Vundle.vim.git ~/.vim/bundle/Vundle.vim

Install Bundles

Open vim and run

:BundleInstall

This should download the bundles specified in .vimrc

I’ll maintain this documentation in my configure-win-dev-workstation repo.

My Favorite Tools

In the last year I’ve discovered some tools that I’ve really enjoyed using. All of these tools are free and most of them have been used in production projects.

Here are my favorites:

Desktop

Remote Desktop Connection Manager: Provides a UI to manage your Remote Desktop connections. Especially useful when working in a shop where the server names are meaningless, though I’m sure no one does that any more. Right? Right?

Powershell: I’ve been meaning to learn Powershell for a long time and I’ve been lucky enough to land in a shop that uses it extensively. It’s well worth learning. I’m constantly looking for ways to automate repetitive tasks.

Libraries

Simple.Data.SqlServer: This micro-orm is very easy to setup and get running. It uses dynamic so any code that uses it should be encapsulated and tested heavily. It’s extremely lightweight compared to NHibernate and Entity Framework (even the Code-First variety), and the built-in mapping code handles the most common conventions.

MVVM Light: A light-weight framework for MVVM applications. The highlight of this lib for me is the Messenger class. On the down side, I wish it had an Async Messenger implementation. Sigh. Kellabyte’s article on MVVM and the ServiceLocator anti-pattern are a good companion read to using this library.

Specflow: Write test cases in English Language and run them as part of an automated build process? Check! I’ve recently used it to document expected functionality for third-party developers.

NBuilder: This tool lets you stand up test POCO’s extremely fast. It provides a fluent API for building objects and lists of objects. It auto-fills top-level property values for value types and strings.

Ninject: This is an extremely easy-to-use Dependency Injection tool. We were using Castle, but it’s hard to upgrade because NHibernate is dependent on it. Also, the Ninject API is a bit more discoverable, and it supports rebinding a dependency. This is useful in unit test scenarios in which you may want to bootstrap the system’s dependency but replace some of them with mocks.

NSubstitute: This mocking framework has a beautiful API, but I have not yet used it in a production app. I’d love to hear from someone who has! Mocking syntax for any non-trivial scenarios is usually very ugly.

Team

NuGet: NuGet is the easiest way to manage dependencies in .NET projects. It’s integrated into Visual Studio 2010.

NuGet TeamCity Plugin: With this plugin you can stop storing binaries in source control You can install packages as part of your TeamCity build, and create and publish packages of your own.

NuGet Gallery: With a little setup effort you can host your own private NuGet feed behind your corporate firewall. Turn your own internal libraries into NuGet packages for easy dependency management!

Confluence: This wiki tool is the easiest to manage I’ve ever seen. It has a great WYSIWYG editor for text and table content, can render Gliffy diagrams, UI mockups, and workflows. This is not a free tool.