Skip to content
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

Support toggle for vertical/horizontal splits #106

Open
benthorner opened this issue Jul 30, 2022 · 1 comment
Open

Support toggle for vertical/horizontal splits #106

benthorner opened this issue Jul 30, 2022 · 1 comment

Comments

@benthorner
Copy link

Would be great to have this kind of functionality as part of the plugin e.g. ToggleBufExplorerVerticalSplit. I made a quick function to do it, but it's hacky because I couldn't reuse the local variables and functions in the plugin itself.

function! CustomToggleBufExplorer()
    if bufname(winbufnr(0)) == '[BufExplorer]'
        execute 'bd'
    else
        call BufExplorerVerticalSplit()
    endif
endfunction

I'm a fan of vertical splits over replacing the current buffer e.g. with NERDTree. Using a toggle command like this makes it so much smoother to open and close a vertical (or horizontal) split over separate key mapping for each operation.

(Super plugin by the way 💯. I've been using it constantly for many years 🎉.)

@clinkzlol
Copy link

Same need : D
I just add another ToggleBufExplorerVertical() to do that~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants