-
Notifications
You must be signed in to change notification settings - Fork 30k
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
Copy/replace/add left <-> right in compare views #25887
Comments
Similar proposal by me following git merge inline actions- #30519 |
I miss that feature as well. Good old NetBeans has a a similar intuitive approach: Only the right side can be edited though, but there's a "swap" button right above the diff to mitigate that ;-) |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I was very surprised that this did not already exist in VS Code. BBEdit isn't perfect, but it does have that. |
+1 |
Super bonus points for allowing mapping to keys so i can create a vim-diff copy |
This is a really good feature which I am looking forward to. In most coding time, I need to diff and merge only two files. I just want to diff and merge and there is no need for me to use git diff for only two files. In present, I use the tool "diff & merge" from jet brains IDE. This is a really good sample plate to reference. I strongly suggest this feature provided in the future version of VSCode. |
Many of us awaiting why not write it |
+1 |
We need this so bad |
This is probably my biggest problem with VS Code so far. I was very surprised that this did not already exist. |
+1 |
3 similar comments
+1 |
+1 |
+1 |
As my proposal #30519 was closed as a duplicate of this one, pasting the text here- Inline actions in diff view for copy, replace, previous and nextThis proposal requests inline actions in diff view, like the inline merge actions are provided for git merge markers within the editor- The code actions can be This proposal can be regarded as an implementation detail of the proposal #25887 . |
Looks great, the only minor issue (and not sure if it's even a real issue) is that breakpoints appear in the gutter so this might conflict with it if someone is trying to add/remove a breakpoint (which I think is minimal) |
Are breakpoints important or even relevant in the diff window?
…On Thu, Jun 9, 2022 at 12:21 PM Miguel Solorio ***@***.***> wrote:
Looks great, the only minor issue (and not sure if it's even a real issue)
is that breakpoints appear in the gutter so this might conflict with it if
someone is trying to add/remove a breakpoint (which I think is minimal)
—
Reply to this email directly, view it on GitHub
<#25887 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AYZHBM4OH3HOM7Z3ETQASFDVOIRYRANCNFSM4DKB7NOQ>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
@schnort this is why I said:
This is the only drawback and other extensions use the gutter besides breakpoints as well, so it's something to keep in mind but not blocking. |
Yes, the right hand side of a diff editor should behave identical to a normal editor, i.e. you can edit, goto definition within, use editor widgets within, add breakpoints, etc. |
@bpasero why?! It makes no sense to set a breakpoint in a compare view. While editing and goto definitions within is useful and practical, breakpoints aren't. |
While I understand that’s desirable, I’ll settle for a functional diff editor that lets me revert changes in the local copy back to the original. Or easily handle conflicting merges.
I don’t want the perfect preventing any movement towards the functional.
… On Jun 11, 2022, at 10:04 AM, Benjamin Pasero ***@***.***> wrote:
Are breakpoints important or even relevant in the diff window?
Yes, the right hand side of a diff editor should behave identical to a normal editor, i.e. you can edit, use editor widgets within, add breakpoints, etc.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were mentioned.
|
I would request to look into my suggestion again. It is based on inline actions, thus leaving the gutter- #25887 (comment) |
Treating the right hand side of a compare editor like a normal editor was a design decision from the beginning with the main intent to allow for edits. But I see no reason why we would artificially reduce functionality from the right hand side without reasons. When I review my changes I like the fact that I can test a change in the debugger right from the compare view by adding a breakpoint. See this example where I want to test a change to a test I did: Btw in the design from the OP I see no problem with still having breakpoints in the editor gutter: |
@bpasero, actually in that last picture, the cross is not a breakpoint, it's to remove the change. So the gutter is probably not usable to add breakpoints or other non-diff functionality (that said, I never used Netbeans so I could be wrong)
... uh, to avoid an overloaded UI? Isn't that what Misolori essentially said?
I guess to each is own. I appreciate the option to edit the code to fix minor issues (e.g. typos) and running the app/test to make sure I didn't introduce a stupid bug. But if I'm at a point where I need a breakpoint, personally I'd rather have a fullscreen window where I can see the whole code instead of being limited to a narrow column (in that regard, I'd love have a quick/easy way to switch to the fullscreen editor from the diff view, with the cursor already moved to the same location as in the diff, I think that would be more useful overall than being able to place/remove breakpoints) |
Implemented in #151826. |
I'm just realizing now that #151826 only partially adresses this. Please create a new feature request if the feature-set not covered in that PR is important for you. |
Please refer back to this issue so that interested parties could see and track it. (And avoid re-posting same request over and over again!) |
I am touched, I saw arrows on compare! after only 5 years |
you have right arrow after 5 years but left[失望] |
Sweet! |
As far as I understand I can only merge to the right, not to the left? Is this in the pipeline? |
See #153620 |
I'm very happy with this change. Now I can merge to the right and hopefully the left will come soon! |
Anyone know if there is a keyboard shortcut for the new update from left to right functionality? |
In the compare views, it would be nice to have
in all views, i.e. the side-by-side and the unified view (there with other text than "left/right").
Now, I need to select the text and copy-paste it. In the unified view, I even can't select the text from the compared file ("left" file in side-by-side view).
A nice UI would be the one as in Meld:
Related: #24390 (but only wanted for staging VCS diffs)
Blocked by: #4180 ?
The text was updated successfully, but these errors were encountered: