luan / vimfiles

The Vim Configuration. Uses vim-plug to manage plugins.
172 stars 58 forks source link

:q should fail when there are unsaved changes #145

Open nwmahoney opened 4 years ago

nwmahoney commented 4 years ago

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:

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

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.