Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ZZ doesn't save and close a new file #859

Closed
eproxus opened this issue Mar 21, 2023 · 1 comment
Closed

ZZ doesn't save and close a new file #859

eproxus opened this issue Mar 21, 2023 · 1 comment

Comments

@eproxus
Copy link

eproxus commented Mar 21, 2023

Describe the bug
I have $EDITOR set to subl -w and want to use the ZZ command after being done with the file (e.g. when making a Git commit). However, this brings up a save dialog that I have to manually confirm. This behaviour doesn't exist in Vim/Nvim which just saves the file (because I just told it to 😄)

To Reproduce
Steps to reproduce the behavior:

  1. Call subl -w foo from the shell (foo must not already exist)
  2. Go to normal mode and press ZZ

Expected behavior
The file is silently saved and closed.

Actual behavior
A dialog shows Do you want to save the changes made to foo? in which I have to press enter again.

Versions
startup, version: 4148 osx arm64 channel: dev

NeoVintageous v1.27.4.

@gerardroche
Copy link
Contributor

This is caused by a race condition due to views being saved asynchronously The
commands that quit or close immediately after saving should be saved
synchronously to avoid this.

Perhaps this is what was causing #819.

@gerardroche gerardroche added this to the 1.29.0 milestone Apr 5, 2023
gerardroche added a commit that referenced this issue Apr 5, 2023
This changes asynchronous file saving by adding a setting to control if
asynchronous file saving is on or off.

Setting `vintageous_save_async` is disabled by default.

Resolves #790
Resolves #859
gerardroche added a commit that referenced this issue Apr 6, 2023
* develop: (31 commits)
  Prepare 1.29.0 release
  Add crp PascalCase coerion, alias of crm (Abolish plugin)
  Update to latest vimdocs
  Refactor: command not found
  Refactor: feed key - incomplete mappings
  Refactor: feed key - partial sequence 🐎
  Refactor: feed key - incomplete mappings 🐎
  Refactor: reload syntax
  Fix reload syntax
  Fix #804 Change syntax highlighting when writing to a new file
  Fix codecov badge
  Add #643 mapping file types as comma-delimited string
  Refactor: resolve count
  Refactor: partial matches
  Fix #859 `ZZ` doesn't save and close a new file
  Add #643 FileType argument in mappings
  Refactor: plugins
  Refactor: requires motion
  Add #861 [count] for D
  Add #860 [count] for C
  ...
eugenesvk pushed a commit to eugenesvk/NeoVintageous that referenced this issue May 16, 2023
This changes asynchronous file saving by adding a setting to control if
asynchronous file saving is on or off.

Setting `vintageous_save_async` is disabled by default.

Resolves NeoVintageous#790
Resolves NeoVintageous#859
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants