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.
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:
nvim foo
i
)bar
<escape>
):q
Currently, this will successfully quit, and you can do the following to see that it saved:
cat foo
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.