More VIM fun: Vundle
During this last RelEng workweek, I thought I’d try a new VIM plugin for reST: RIV. While that didn’t work out great (yet), it did get me to start using Vundle. Vundle is a quite nice vim plugin manager, and is easier for me to understand than Pathogen.
However, the Vundle docs didn’t cover two cases I care about:
- converting Pathogen modules for Vundle usage
- using with bundles not managed by either Pathogen or Vundle. (While Vundle running won’t interfere with unmanaged bundles, the :BundleClean command will claim they are unused and offer to delete them. That’s just too risky for me.)
The two cases appear to have the same solution:
- ensure all directories in the bundle location (typically ~/.vim/bundles/) are managed by Vundle.
- use a file:// URI for any bundle you don’t want Vundle to update.
For example, I installed the ctrlp bundle a while back, from the Bitbucket (hg) repository. (Yes, there (now?) is a github repository, but why spoil my fun.) Since the hg checkout already lived in ~/.vim/bundle, I only needed to add the following line to my vimrc file:
Bundle 'file:///~/.vim/bundle/ctrlp.vim/'
Vundle no longer offers to delete that repository when BundleClean is run.
I suspect I’ll get errors if I ever asked Vundle to update that repo, but that isn’t in my plans. I believe my major use case for Vundle will be to trial install plugins, and then BundleClean will clean things up safely.
MySQL & Python on Mac
I don’t have MySQL installed globally, so need to do this dance every time I add it to a new virtualenv:
- Install the bindings in the virtual env. The package name is MySQL-python.
- Symlink libmysqlclient.18.dylib from the /usr/local/mysql/lib tree into site-packages of the virtualenv
- Add the following to the virtual env’s activate script::
- DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/path/to/venv/site-package
- optionally add /usr/local/mysql/bin to PATH as well.