mirror of
https://github.com/neovim/neovim.git
synced 2026-08-29 10:31:48 +00:00
feat: ":write ++p" creates parent dirs #20835
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
they do not exist
- Note: `:foo ++…` is usually for options. No existing options have
a single-char abbreviation (presumably by design), so it's safe to
special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.
closes #19884
This commit is contained in:
@@ -438,6 +438,8 @@ Where {optname} is one of: *++ff* *++enc* *++bin* *++nobin* *++edit*
|
||||
bad specifies behavior for bad characters
|
||||
edit for |:read| only: keep option values as if editing
|
||||
a file
|
||||
p creates the parent directory (or directories) of
|
||||
a filename if they do not exist
|
||||
|
||||
{value} cannot contain white space. It can be any valid value for these
|
||||
options. Examples: >
|
||||
|
||||
Reference in New Issue
Block a user