From 1fffa6426c1c511668ccf4f5d17a63e94536d5e9 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 30 May 2019 16:40:58 +1200 Subject: Extend to respect 'confirm' if set --- doc/write_mkpath.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/write_mkpath.txt b/doc/write_mkpath.txt index 8d7bcc2..f9d0c9d 100644 --- a/doc/write_mkpath.txt +++ b/doc/write_mkpath.txt @@ -2,8 +2,17 @@ DESCRIPTION *write_mkpath* -If |:write!| is issued for a file that has nonexistent path elements, create -the full path with |mkdir()| before saving. +This plugin supports creation of any missing path elements in the path to a +buffer's filename before the buffer is written. + +If 'confirm' is enabled on |:write| or |:w|, the user will be prompted to +confirm that Vim should create any missing path elements. + +On |:write!| or |:w!|, the path will be created automatically, ignoring the +value of 'confirm'. + +The directory creation is done using the |mkdir()| command, with its {path} +argument set to 'p' to create the elements recursively. REQUIREMENTS *write_mkpath-requirements* -- cgit v1.2.3