Patching Vim via Homebrew to fix YouCompleteMe error messages ‘Back to original’

One of the plugins for vim I rely on heavily is
YouCompleteMe. It really is amazing
but there is one small problem as it generates completion error messages all the
time while typing.

There is a fix for
which sadly has
not landed in Vim yet, but as detailed in the issue on
it is easy to
patch it yourself. Since I installed vim via Homebrew the way to go was to add
the patch to the Homebrew formula and go from there. So this is what I did.
First I don’t like to work in the Homebrew master so I created a new branch

$ cd `brew --prefix`
$ git checkout -b add-ycm-message-silence-patch
$ vim Library/Formula/vim.rb

Afterwards it’s time to put the new patch in the formula, at the bottom of the
file after __END__. The method

def patches; DATA; end unless build.head?

will apply all patches preset in the DATA section, which is the part of the file after
__END__. I created a version in my fork of homebrew.

And low and behold after a reinstall

$ brew uninstall vim
$ brew install vim --override-system-vi 
  --with-client-server --with-lua 
  --with-mzscheme --with-perl --with-tcl

The annoying errors are gone.


New version of Todo.txt for Vim

It’s time to make stuff better, today I got around to ease the use of
Todo.txt in Vim.

  • made the it respect the fact that todotxt fileformat does not like
  • made it aware of :TodoDone as well as :TodoArchive commands
  • removed some weired functions around activating and deactivating which were
    really just a fix for my own setup which was screwed up

Enjoy and download at Github
see the
Readme for
further information

JSHint and Vim

Using JSHint from Vim

Even though I am not a huge fan of JSHint it is
a useful tool here and there, especially to enforce some guidelines in your
code to keep a consistent style. Personally I think style matters, even though I
might not care about certain ones, at least I should be consistent all the way
across. So this is where JSHint comes in and lets you define a certain set of
rules to stay true to, and also eliminate some potential bugs and smells.

Running it is simple, just install via npm globally

$ npm install jshint -g

And run passing the config and the file to hint

$ jshint --config jshint.json myfile.js

Since I personally prefer to run as much as possible from Vim directly I created
a short function to do it for me.


Slimy Vim

Since taking a look at clojure again I was looking
over at Emacs thinking, even though it feels unusable to me it has the nice
feature of evaluating an expression right here and now. Since I’m kind of
invested in both Vim as well as Textmate, with Vim being my current favorite,
I was looking around to get similar. What I came across first was running the
VimClojure Plugin which includes the Nailgunserver, running a single clojure instance evaluating the code you sent to it.
Even though it feels nice to use it mainly works for clojure and is kind of
heavy weight to set up. A simpler solution was described in a post about setting
up clojure on Vim and uses slime to pass
code to a screen window running some interpreter. The nice thing is it works the
same for ruby, python, nodejs, clojure, etc.. My current setup is available found at