Misc changes

I've made a couple of improvements, as documented by the commit messages. Feel free to cherry-pick the ones you want.

Not sure why someone else's random commit appears in this pull request, but I have nothing to do with the vim plugin.