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

Open new tab with diffview with same revision #432

Open
Eryx5502 opened this issue Oct 22, 2023 · 4 comments
Open

Open new tab with diffview with same revision #432

Eryx5502 opened this issue Oct 22, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@Eryx5502
Copy link

Hi!

This is a question / feature request. I tried to find some answers both reading :h diffview-actions and searching the issues but didn't find an answer. It might be I'm missing something of the purpose of Diffview, but I just started using it for PR revisions and I find myself wanting to jump from a file to another without leaving Diffview. Is it possible to add a keybinding from the file panel to open the file under the cursor on a new Diffview tab with the same revision as the current one?

@sindrets
Copy link
Owner

Why do you need to open a file in a new diffview, in a new tab? In what way is it insufficient to open the file in the current diffview tab?

@Eryx5502
Copy link
Author

Eryx5502 commented Oct 22, 2023

I'm working on a project where big PR are not rare, and so I often have a big tree on the diffview file panel. When reviewing a file A which calls several things defined on another file B, I usually switch from A to B to check what the PR introduces on each of this files as a way to understand what is going on.

For this, and since the file tree is a big one, switching from the diffview from one file to the other one takes some effort. On the other hand, if I could easily open a new diffview tab with the other file opened in the same revision the only thing I would need to do is switch tabs.

@sindrets
Copy link
Owner

Thank you. That's important context. I understand the problem now. We can certainly add an action for this. Or perhaps just extend the existing open_in_diffview to do this when invoked from non-history diffviews.

@sindrets sindrets added the enhancement New feature or request label Oct 22, 2023
@Eryx5502
Copy link
Author

Thank you. That's important context.

Yes, sorry I didn't add that to the original message!

Another way of solving this "big PR" that just came to my mind could be to implement some file finder inside the review file pane, but I'm not sure how hard that might be. An maybe it should be a separate feature request anyway.

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

No branches or pull requests

2 participants