Rewritten in pure vimscript

Removes the ruby dependency on vim