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

Easy way to open diffs from :Gstatus in a new window #318

Open
qstrahl opened this issue Mar 14, 2013 · 5 comments
Open

Easy way to open diffs from :Gstatus in a new window #318

qstrahl opened this issue Mar 14, 2013 · 5 comments
Labels
enhancement New feature or request

Comments

@qstrahl
Copy link
Contributor

qstrahl commented Mar 14, 2013

The diff commands in the :Gstatus window (D, ds, dv) all go to the last active window (or stay in the :Gstatus window if no other windows exist) and start the diff there, leaving me with the chore of navigating back to the file formerly in that window once I'm done. Does there exist a way to make these commands open a new window (or tab, maybe, depending on user preference?) so as to avoid messing up my layout? If not, can that be done?

@tpope
Copy link
Owner

tpope commented Mar 14, 2013

Well, there's already one new window opened for the diff. Do you want two
new windows, one for old and one for new? Four windows counting the status
window starts to sound pretty confusing to me. Maybe a new tab would be
better? Or did you have something else in mind entirely?

On Thu, Mar 14, 2013 at 11:52 AM, Quinn Strahl notifications@github.comwrote:

The diff commands in the :Gstatus window (D, ds, dv) all go to the last
active window (or stay in the :Gstatus window if no other windows exist)
and start the diff there, leaving me with the chore of navigating back to
the file formerly in that window once I'm done. Does there exist a way to
make these commands open a new window so as to avoid messing up my layout?
If not, can that be done?


Reply to this email directly or view it on GitHubhttps://github.com//issues/318
.

@qstrahl
Copy link
Contributor Author

qstrahl commented Mar 14, 2013

In brevity, I don't want the command to touch the windows that already exist. I admit that's a lot of windows to be working with, but then, the user has already opened the status window and has asked to see a diff; nothing unexpected. How about dn for "Diff New" and dt for "Diff Tab"? The maps seem available and semantically nice.

@acornejo
Copy link

+1 for diff in new tab, happy to implement this as a pull-request if it has a chance of being accepted.

@tpope
Copy link
Owner

tpope commented Aug 17, 2019

Here's a crazy idea: what if using the diff maps in visual mode opened a diff for each file in its own tab? I think this is the only sensible behavior for diffing multiple files at once, so it's unlikely we'll ever want the visual mode maps for something else, and it scales down to the one file case just fine.

Edit: a count — 1dd — would also work.

@StrongerXi
Copy link

StrongerXi commented Jun 17, 2022

Any update on this? Would be a really helpful feature imo. Specifically dt to open diff in a new tab.

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

4 participants