-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: auto-quit vim if oil is closed as last buffer #491
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a fine customization, but it should be done by passing in options to the function rather than a config option. The oil.close
function should take an option table with something like close_if_last_buf
as the parameter. Then the close action should be reworked to accept the same options, similar to how actions.cd accepts options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose exit_if_last_buf
to make it more clear that it is separate from oil.close
but if you prefer 'quit' or 'close' than I can resubmit!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple nits left
Any update on this? |
LGTM! |
Added a simple feature that will auto-quit vim if oil is closed and there are no other buffers open. I added an option to
config.lua
to opt-in to this behavior.