Skip to content
This repository has been archived by the owner on Jun 8, 2022. It is now read-only.

:q should fail when there are unsaved changes #145

Open
nwmahoney opened this issue Nov 14, 2019 · 0 comments
Open

:q should fail when there are unsaved changes #145

nwmahoney opened this issue Nov 14, 2019 · 0 comments

Comments

@nwmahoney
Copy link

According to the neovim docs, :q should fail when there are unsaved changes. Although I can't figure out how, this repo seems to remap :q to :wq. This seems dangerous, since people (like myself) might assume that they haven't changed anything if :q succeeds.

Steps to reproduce:

  • open a new file with nvim foo
  • go into insert mode (type i)
  • type bar
  • return to normal mode (hit <escape>)
  • quit by typing :q

Currently, this will successfully quit, and you can do the following to see that it saved:

  • type cat foo
  • you should see the following output: bar

Instead I would expect it to fail. And I definitely would not expect to have a new file named foo after following these steps.

If you decide not to change this behavior, I think it would be worth calling it out in the README under Defaults Overridden.

FWIW, I actually thought at first that I couldn't turn autosave off, so I created an issue for that.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant