Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make :write recursively create parent folders by default #2259

Closed
lukepighetti opened this issue Apr 24, 2022 · 4 comments
Closed

Make :write recursively create parent folders by default #2259

lukepighetti opened this issue Apr 24, 2022 · 4 comments

Comments

@lukepighetti
Copy link

Reproduction

  • hx /tmp/path/to/deep/file.txt
  • write some text
  • :write

Error: Async job failed: can't save file, parent directory does not exist

Expected Result

Create all the parent folders automatically. This mirrors the expected behavior from IDE editors like VSCode.

@the-mikedavis
Copy link
Member

This is the behavior of the new :write! command: #1839

@lukepighetti
Copy link
Author

Thanks for the fast triage, out of curiosity, any reason why a new command was created?

@archseer
Copy link
Member

See #1839 (comment)

expected behavior from IDE editors

This isn't common by default in editors like nvim, kakoune or emacs though.

@archseer
Copy link
Member

The :command vs :command! are sort of similar to command vs sudo command in the shell

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants