Makes Vim prompt to create missing directories when saving a file.
Typically useful when you want to create a file in a directory that does not yet exist -- instead of printing an error and having you go around create that directory and then continue creating the file, you'll just be asked if the directory should be created and can get on with it.
The mkdir-hook itself is a slight variation of Damian Conway's "Conditionally autocreating non-existent directories" example.
If you don't have a preferred installation method, I recommend installing pathogen.vim, and then simply copy and paste:
cd ~/.vim/bundle
git clone git://github.com/earl/vim-automkdir.git
Copyright © Andreas Bolka. Distribtued under the same terms as Vim itself. See
:help license
and the accompanying LICENSE
file.