Entries tagged with vim

Integrate your python test runner into vim

6. March 2010 - view comments

I've lately browsed the dotfiles repository of Gary Bernhardt and found a wonderful gem in his .vimrc. He has implemented some clever functions that run your testsuite and shows you a pretty, colorful bar below your statusline to indicate if all tests have passed or if some of them have failed.

If your tests are passing, it shows you a bright green bar to visualize that everything went well. If some test are failing your quickfix list is populated with all failing assertions and your cursor jumps to the first one.

I adapted his implementation and changed some points to make it fit for my work with django. The code can find out to which app the file you are editing belongs to and only runs tests for this particular application.

read more.