(mini.bufremove) create modifiable buffer rather than a scratch buffer#394
(mini.bufremove) create modifiable buffer rather than a scratch buffer#394echasnovski merged 1 commit intonvim-mini:backlogfrom
Conversation
|
Thanks for taking your time creating this! I don't really understand what do you mean by "the core vim behavior that people may be accustom to". Could you elaborate, please? Showing scratch buffer this scenario is and not a normal one in intentional. The core reasoning behind it is to signal user that there is no more "good" buffers available to show. At the moment I am more inclined to resolve this along the lines of #389: suggest creating own wrapper functions which perform something extra (like changing |
|
When I say the "core vim behavior", I'm referring to the default behavior of |
|
I definitely understand your reasoning for changing this default behavior, but it might be a good idea to at least provide a configuration option to allow people to replicate an experience similar to the default behavior they may have become used to in their workflow. |
I see. This is not entirely the case (running I am still inclined towards recommending writing own wrapper. Hiding this behavior behind an option will result into a lot of change: it should introduce separate |
|
Thanks for your consideration. I understand not wanting to add configuration options. But I think if you want to minimize the configuration and additional features, it's probably a good default to follow the behavior that people may have been accustom to.
It is particularly strange that because it is a scratch buffer it is still listed so it's sort of a weird in between of looking legitimate but the only difference is it doesn't know if it's been modified or not |
|
@echasnovski I just came across another super strange side effect of using a scratch buffer. If I put content inside of the buffer and then save it to a file with |
|
Hi, love your work. |
|
After sleeping on it, I think I'll make a breaking change here as you've suggested. It is not that big of a break and is obviously matters for more than one person. I'll merge it to my "backlog" branch, polish this up a bit, and then push to |
|
Thank you so much! |
When closing the last buffer with
bufremoveit gives you a scratch buffer rather than just a normal buffer. This means if you modify it and run:confirm qit won't warn before closing. This can be pretty detrimental especially for people who are used to core vim behavior. By just creating a normal buffer without thenofilebuffer type we can re-alignmini.bufremovewith the core vim behavior that people may be accustom to. This also remains un-opinionated because it doesn't set any file types or buffer types.If you don't want this change, it could be a good idea to have a configuration option that allows users to align themselves with the core vim behavior if they are used to it.
This also would resolve #372 confusion