-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feature request: :wq #221
Comments
I added support for this. It's a bit of a hack, but it seems to work well enough. I'm a little concerned that there may be some unintended edge cases, so there's a chance I'll have to tweak this or roll it back. |
I'm running into an edge case of this change that causes Neovim to close unexpectedly. I have the following keymaps: To reproduce:
This happens because commands run through keymaps are not inserted into the history table so the last command is still Thanks for all the work you do! EDIT: I found a hack workaround for myself:
|
I'm using LunarVim and the default
|
The previous mechanism used histget() to get the last command or expression to detect if the user issued a `:wq` or similar. This had the issue where if a user issued a `:wq`, started vim again, then entered oil and saved via some mechanism that is _not_ a command (e.g. a keymap), we would incorrectly detect that `:wq` and exit after saving. The new mechanism tracks all keypresses and may end up with false negatives (e.g. ":wqaff<backspace><backspace>ll"), but those are less frustrating than false positives.
Did you check existing requests?
Describe the feature
:wq
currently behaves like:w
. If the command was successful (the user presses[O]k
),:wq
should close Neovim as well.Provide background
I genuinely might see myself using oil.nvim as a file manager replacement, and this would save a lot of time for quick operations.
Additional details
No response
The text was updated successfully, but these errors were encountered: