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

Feature request: preview buffers #66

Open
tandrewnichols opened this issue Sep 21, 2017 · 2 comments
Open

Feature request: preview buffers #66

tandrewnichols opened this issue Sep 21, 2017 · 2 comments

Comments

@tandrewnichols
Copy link

tandrewnichols commented Sep 21, 2017

I can't find a buffer plugin that does this, so I'm hoping this is something bufexplorer could incorporate (probably behind an option). Say I open bufexplorer in a vertical split (which is what I usually do). As I move over buffers (with j and k, for example), I would like the buffer under the cursor to show up in the left pane (a "preview" if you will), and then when I press Enter, bufexplorer closes leaving me in the selected buffer (which is basically the current functionality for Enter).

Alternatively, if there's a way to define mappings inside a bufexplorer window, possibly I could make this work on my own.

My reasoning for this is that a list of file names is difficult to grok, and if you have multiple files named the same thing (or almost the same thing), it takes me longer than I'd like to locate the buffer I want.

I realize this is a complicated feature request, as you have to handle edge cases like "What if the user hits t instead of Enter?" and "What if the user closes bufexplorer without selecting a buffer? Should it revert to the buffer that was open when bufexplorer was invoked?"

@jlanzarotta
Copy link
Owner

Sorry for the delay.

Your request definitely sounds interesting... And on the other hand, very complicated. I wonder if a combination of WinManager and bufexplorer would help possibly.

@tandrewnichols
Copy link
Author

I wasn't aware of WinManager, so maybe, although I don't know that I want those things open all the time. I did also just check :set ft? in a bufexplorer window and I see filetype=bufexplorer, so I could conceivably do these mappings myself with autocommands based on Filetype. It's unclear to me off the top of my head how crazy that will end up being, but I can keep you apprised. (It would certainly be less crazy for me, as I would probably only handle edge cases that my personal preferences are likely to encounter instead of all possible edge cases.)

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