vim and zsh: Creating directories for files with ease

This is a small article about a thing I made because I was fed up with having to mkdir -p all the time. Assume you follow an howto and you get the create this file /path/to/file and you don&rsquo;t have that path yet. Now you can do mkdir -p /path/to and then open the file in your editor. I did that, but I got annoyed by it. So I wrote a little helper mkdir-from-filename which creates a directory…