diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-04 08:11:54 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-04 08:11:54 +1200 |
commit | 4446965692bcdca861c1c2c6fc9b71e08c5e0b1f (patch) | |
tree | db8dcf46153c4ecccd95218f244c05982f047880 /autoload/write_mkpath.vim | |
parent | Don't rename buffer if directory creation failed (diff) | |
download | vim-write-mkpath-4446965692bcdca861c1c2c6fc9b71e08c5e0b1f.tar.gz vim-write-mkpath-4446965692bcdca861c1c2c6fc9b71e08c5e0b1f.zip |
Re-run BufWritePre hooks after successful rename
Diffstat (limited to 'autoload/write_mkpath.vim')
-rw-r--r-- | autoload/write_mkpath.vim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim index 95fab08..7610b87 100644 --- a/autoload/write_mkpath.vim +++ b/autoload/write_mkpath.vim @@ -33,4 +33,9 @@ function! write_mkpath#(path) abort " subsequent change of working directory doesn't break it silent keepalt file % + " Re-run the BufWritePre hooks, now that the directory exists and a useable + " filename has been set; this will start this function again from the top, + " but stop when it sees the directory now exists + doautocmd BufWritePre + endfunction |