Automatically create directories that don't exist yet when writing a file.
This allows you to do:
vim ~/a/dir/tree/that/doesnt/exist/new-file.txt
and then just use :w
(or ZZ
, or :up
, etc.) to create the directory tree.
This is basically the same as the auto_mkdir
plugin, although it was developed independently. This version has the option to
confirm directory creation and includes a bugfix for unicode directory names.
See :help auto_mkdir2
for the full documentation.