You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Allow merging from right to left with diff arrows view #153620
The arrows work for merging from the left hand to the right-hand file, that's great 👍
However, there's no way to do the opposite. I was thinking I could alt or shift-click on the arrow (or at least have a context menu) to go the other direction, but I cannot.
Reacted by Blake Preston, Michael Weinold, heartacker, Nicolas HENRY, Daniele Cattaneo, KamasamaK, Rob, Tyler Neuenschwander, Miguel Solorio, Marcus Llewellyn and 46 more
Reacted by a13ph
Reacted by Ernest, Thomas Güttler, Ryan M Smith, Prasanna Venkatesh T S and rh314
I think right => left arrows are helpful when the left-hand-side editor is editable (e.g. in a file-to-file compare view). But they don't make sense for same-file diff views ("source control diff views"). This should be considered when implementing this.
Put this in a right-click context menu sounds doable and doesn't affect the editor experience too much (e.g. doesn't consume more horizontal space), though a nit-picking point is it is not symmetric and doesn't treat left / right arrows equal.
Maybe we can use the EditorGutter in the merge editor to get rid of the glyphs. Then we can show arrows next to each other for both ways.
Thanks for the pointer, I'll take a look at the EditorGutter and see if / how the arrows can make use of it.
Reacted by Michael Weinold, Faris Hijazi, Chris Denneen and Andrii Oriekhov
Yea, the use case I was using for testing was "compare active file with...". I think if the LHS is readonly, then having unidirectional arrows makes sense.
Reacted by Rob, Faris Hijazi, Roger Senna and Andrew Davis
In IntelliJ the arrows are added to whichever side is editable which can mean they could both appear at the sametime, also atm the arrows from the left to the right hand side appear even if the right hand file is not editable and don't do anything upon click
Reacted by Michael, Faris Hijazi, Ernest, Andrii Oriekhov, Helder Pereira, H. Z. Sababa, Selene and Markus Völk
Mingpan would adding the opposite direction be possible?
Also noticed that if you have a complete empty space the copy arrow works... if not it doesn't provide an option to copy what is on left to right... so for in the screenshot maybe we want to copy the format from left to right? It doesn't provide an arrow to do that. Those are only provided where complete lines are missing on the right side.
So I have to do the compare merge in BeyondCompare external to VSCode be able to copy-left AND copy-right? Maybe I'll look into the Meld tool until this gets "fixed". Although swapping sides may be useful, but there are many times I am moving changes in both directions. I love my BeyondCompare, but we don't need THAT much functionality.
So with that you can effectively "copy from right to left" by swapping (and then if you need you can swap back)
Note; I don't think you can do this with the diff editor when using it to compare changes to a file in version control. You're not comparing two files, you're comparing the current state to a previous state. The previous state (last commit) is locked in, so you can't swap in order to copy changes from current state to previous state.
Repeatedly swapping left and right sides to pick the right one works but I find it disorienting, I'd still much rather have two arrows pointing each side to "Copy left to right" / "Copy right to left" in the case when both sides are editable (for example when using "File: Compare Active File With...")
Reacted by Andrew D. Bond, reuschling, SteveM, Dmytro Tiapukhin, Markus Völk and Mitchell Ensink
Activity
hediet commentedon Jun 29, 2022
FYI Mingpan. Maybe we can use the EditorGutter in the merge editor to get rid of the glyphs. Then we can show arrows next to each other for both ways.
Mingpan commentedon Jul 2, 2022
Thanks for the feedback!
I think right => left arrows are helpful when the left-hand-side editor is editable (e.g. in a file-to-file compare view). But they don't make sense for same-file diff views ("source control diff views"). This should be considered when implementing this.
Put this in a right-click context menu sounds doable and doesn't affect the editor experience too much (e.g. doesn't consume more horizontal space), though a nit-picking point is it is not symmetric and doesn't treat left / right arrows equal.
Thanks for the pointer, I'll take a look at the EditorGutter and see if / how the arrows can make use of it.
connor4312 commentedon Jul 2, 2022
Yea, the use case I was using for testing was "compare active file with...". I think if the LHS is readonly, then having unidirectional arrows makes sense.
gulshan commentedon Jul 20, 2022
I think an option to "swap sides" in the comparison page will be good enough for me.
nbransby commentedon Sep 1, 2022
In IntelliJ the arrows are added to whichever side is editable which can mean they could both appear at the sametime, also atm the arrows from the left to the right hand side appear even if the right hand file is not editable and don't do anything upon click
shef-er commentedon Oct 6, 2022
Also want this feature. Wonder this feature still has not implemented
alexolog commentedon Oct 7, 2022
Another vote for bidirectional copying. There is more to diff than source control.
tonoslav commentedon Oct 25, 2022
I think adding just some shortcut to switch direction would be awesome, for example if you hold CTRL arrow would switch to left and do what is should
cdenneen commentedon Nov 21, 2022
Mingpan would adding the opposite direction be possible?
Also noticed that if you have a complete empty space the copy arrow works... if not it doesn't provide an option to copy what is on left to right... so for in the screenshot maybe we want to copy the format from left to right? It doesn't provide an arrow to do that. Those are only provided where complete lines are missing on the right side.
wh0else commentedon Jan 23, 2023
+1
cheezit46 commentedon Mar 22, 2023
Definitely would like a left arrow.
I know we'd basically be making the Meld tool in vs-code, and I'm fine with that.
RufusVS commentedon Apr 27, 2023
So I have to do the compare merge in BeyondCompare external to VSCode be able to copy-left AND copy-right? Maybe I'll look into the Meld tool until this gets "fixed". Although swapping sides may be useful, but there are many times I am moving changes in both directions. I love my BeyondCompare, but we don't need THAT much functionality.
shef-er commentedon Feb 5, 2024
Henning Dieterichs (@hediet) Any progress on this?
holdingsllc commentedon Feb 22, 2024
I'm amazed that this essential feature still doesn't exist. What's going on?
kmhatre14 commentedon Jul 15, 2024
+1
nemchik commentedon Jul 16, 2024
It seems like the ability to swap what is on the left and right now exists, so it's possible to achieve getting changes from A to B or B to A.
kmhatre14 commentedon Jul 16, 2024
How do you swap?
I don't see any option when I select files to compare
nemchik commentedon Jul 16, 2024
Two new unsaved files


Swap button
So with that you can effectively "copy from right to left" by swapping (and then if you need you can swap back)
Note; I don't think you can do this with the diff editor when using it to compare changes to a file in version control. You're not comparing two files, you're comparing the current state to a previous state. The previous state (last commit) is locked in, so you can't swap in order to copy changes from current state to previous state.
nbros commentedon Sep 18, 2024
Repeatedly swapping left and right sides to pick the right one works but I find it disorienting, I'd still much rather have two arrows pointing each side to "Copy left to right" / "Copy right to left" in the case when both sides are editable (for example when using "File: Compare Active File With...")
wwdok commentedon Sep 26, 2024
It can add a column of left arrow as shown in the following red box:

erdult commentedon Feb 13, 2025
this is a required addition, also shortcut keys to move between