diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-01 18:26:17 +1200 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2019-06-01 18:47:48 +1200 |
commit | eb87e294faec5c66dfac3bbe8bfa1fa35c17bdc8 (patch) | |
tree | cfe83ac8ffa57287ba1f623d30ce26717ae08666 | |
parent | Merge branch 'release/v2.0.0' (diff) | |
download | vim-write-mkpath-eb87e294faec5c66dfac3bbe8bfa1fa35c17bdc8.tar.gz vim-write-mkpath-eb87e294faec5c66dfac3bbe8bfa1fa35c17bdc8.zip |
Use :file to recognise created path at end of hook
-rw-r--r-- | autoload/write_mkpath.vim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/autoload/write_mkpath.vim b/autoload/write_mkpath.vim index 8a3ac9d..cba56e9 100644 --- a/autoload/write_mkpath.vim +++ b/autoload/write_mkpath.vim @@ -26,4 +26,8 @@ function! write_mkpath#(path) abort call mkdir(dir, 'p') endif + " Prod Vim into realising the buffer's directory exists now, so that a + " subsequent change of working directory doesn't break it + silent keepalt file % + endfunction |