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

:q should fail when there are unsaved changes #145

@nwmahoney

Description

@nwmahoney

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions