-
Notifications
You must be signed in to change notification settings - Fork 6
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: Open file while retaining focus / Preview files #28
Comments
I've wanted something somewhat like this before for easily previewing files. I can easily see a feature serving both this open but keep focus use case and file previews. I'll have to look at how vim-vinegar and vim-dirvish implement previewing to see how to fit this into Dirbuf For (1), I normally split and then open Dirbuf in the place of the new split rather than opening Dirbuf and then splitting. But, if (2) is implemented then it should be fairly easy to make a custom mapping or command that does exactly this. |
I hope you don't mind me changing the issue name. Just trying to organize it in terms of what should be implemented |
No worries! :) |
As I noted in #22 (comment), this is exactly what I do some of the time. BUT:
|
So previewing actually works today if you use |
(1) I would like to open Dirbuf, find a file, open it in a new vertical split, and close Dirbuf (restoring the previous buffer that was in the window that Dirbuf was rendered in).
In other words, I would like Dirbuf to open a file in a new split, restore the previous buffer that was in its own window, and then delete itself.
If I try
require('dirbuf').enter('vsplit')
, it does this, but then leavesDirbuf
in open in the original window. I then have to navigate back to the original window and either hit<C-O>
or quit it myself. If I accidentally hit:bwipe
, then I lose the split that I wanted open (had the buffer view that I was using before I launched dirbuf).(2) Extension of this: I would like to select a file in
Dirbuf
, and open it in a new split (vertical or otherwise) in the background (i.e., not just keeping Dirbuf open, but also retaining focus on Dirbuf.The text was updated successfully, but these errors were encountered: