Closed jasper-schnabel closed 2 years ago
First of all thanks for the kind words :slightly_smiling_face:
The reason you see the buffer in your buffer list is because of two things:
buflisted
set on by default, so that these buffers show up in the buffer list:h 'buflisted'
)Call DrexDrawerToggle
, then immediately check your buffer list and you will see that the drex buffer is present already even before closing it again
I do not plan to change the behavior of keeping drex buffers around for reusage (1.). Imagine the following scenario: you open the drawer, then expand some sub directories and then close the drawer window again. Now when you re-open it you would probably expect the drawer window to be exactly as you left it (with all directories expanded). Also this reduces the number of directory scans that have to be done when opening and closing drex buffers
However I made the drex buffers "listed" intentionally (2.) so I could easily jump to a specific already opened buffer via the buffer list. If this does work against the flows of other users I could make this option configurable, so that drex buffers would be "unlisted" by default and not appear in the buffer list at all (for those who prefer to not see them there). Would that solve your problem here? :thinking:
If this does work against the flows of other users I could make this option configurable, so that drex buffers would be "unlisted" by default and not appear in the buffer list at all (for those who prefer to not see them there). Would that solve your problem here?
Thanks for the quick response and the detailed explanation of the buffer, that definitely made sense to me. Yes that would absolutely solve my problem and would be great.
Thanks
I had another thought about this and there is a simple solution without the need for another configuration option.
Just add the following snippet to your configuration:
vim.cmd('autocmd FileType drex setlocal nobuflisted')
I will probably add some information about this to the repository wiki
Please let me know if you have any more questions :slightly_smiling_face:
Hey,
Thanks for the very cool plugin, I really like the simplicity.
I have found something that causes me trouble. When you call Drex with
:DrexDrawerToggle
and then close it again with:DrexDrawerToggle
a Drex buffer remains, which is very annoying when cycling through the buffers.Before:
After: