lambdalisue/vim-fern

Option to reset drawer width when toggled

tomtomjhj opened this issue · 2 comments

Hi.

When I toggle the drawer off and then toggle it on again, I'd like it to have the default width g:fern#drawer_width or some value specified by -width. However, if auto_resize is enabled, fern will remember whatever the drawer's last width was, even if I don't want that value (for example, I may want that width only temporarily, or I could've changed the width by mistake). On the other hand, if auto_resize is disabled, I run into the issue demonstrated in #335.

While I could add some custom script to reset the width in my config or manually run N<C-w>|, I believe that resetting is probably the behavior most users would expect. So I suggest adding an option for this behavior or even making this the default.

Thanks.

Z (<Plug>(fern-action-zoom:reset)) may help you.

Thanks!