aboutsummaryrefslogtreecommitdiff
path: root/plugin/write_mkpath.vim
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/write_mkpath.vim')
-rw-r--r--plugin/write_mkpath.vim4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/write_mkpath.vim b/plugin/write_mkpath.vim
index 334f24e..c7c9543 100644
--- a/plugin/write_mkpath.vim
+++ b/plugin/write_mkpath.vim
@@ -12,6 +12,8 @@ endif
" Check path to every file before it's saved
augroup write_mkpath
autocmd!
+ autocmd BufNewFile *
+ \ call write_mkpath#New(expand('<afile>'))
autocmd BufWritePre *
- \ call write_mkpath#(expand('<afile>:p:h'))
+ \ call write_mkpath#Write(expand('<afile>'))
augroup END