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 to edit the left hand side of a diff editor if possible #4180
You can hit it by using Compare with action and --diff. This is really sad. The editor on the left should only be read-only if the input behind it is really read-only (coming from the git index, for example).
On my side it would be pretty easy to just comment out the forcing of readOnly=true on the left-hand-side. But I need to add an option to allow the workbench to make the git diff case left-hand-side readOnly.
alexandrudima yeah I think we know in all places if the left hand side should be editable or not, I think it would only be the file-2-file compare where this applies.
It would be cool to have two buttons in the middle "copy changes from left to right" and vice versa.
Like this (Eclipse):
The ability to move code from the original to the new is pretty fundamental in vcs compare tools. I don't think I've ever found a diff tool before that doesn't have it.
Reacted by Silvio Clécio, Johannes, Britford, Somnium7, James Harrang and Scott Silliman
I pushed a change to enable this by default if the left-hand editor is not readonly. Pressing CtrlCmd+S or File > Save will now save both sides of the diff editor.
Benjamin Pasero (@bpasero) Thanks for implementing! Now that this is closed, is it possible to finally implement #25887 and #37350? This would address a critically missing piece of editor functionality that has been heavily requested for over two years.
Also mentioning alexandrudima who has been consolidating a number of issues to #25887
Activity
bpasero commentedon Mar 14, 2016
Yes I always wanted that actually :)
alexdima commentedon Mar 14, 2016
On my side it would be pretty easy to just comment out the forcing of
readOnly=trueon the left-hand-side. But I need to add an option to allow the workbench to make the git diff case left-hand-side readOnly.alexdima commentedon Mar 14, 2016
There's also the inline diff case, where I cannot make the "original" editable.
bpasero commentedon Mar 14, 2016
alexandrudima yeah I think we know in all places if the left hand side should be editable or not, I think it would only be the file-2-file compare where this applies.
Add `originalEditable` option to diff editor (#4180)
alexdima commentedon Mar 14, 2016
Ok, there is a new option
originalEditableto the diff editor. It is false by default.bpasero commentedon Mar 14, 2016
alexandrudima cool, let me pick this up then...
bpasero commentedon Mar 14, 2016
alexandrudima so by default this option is true or false?
alexdima commentedon Mar 14, 2016
:) Wrote in comment and in jsdoc: it is false by default.
bpasero commentedon Mar 14, 2016
👍
25 remaining items
Paperalien commentedon May 2, 2019
The ability to move code from the original to the new is pretty fundamental in vcs compare tools. I don't think I've ever found a diff tool before that doesn't have it.
tdomhan commentedon Jun 17, 2019
"diffEditor.originalEditable": true,works perfectly! Is there any way to make this the new default? I can't imagine ever not wanting this on.bpasero commentedon Nov 19, 2019
I pushed a change to enable this by default if the left-hand editor is not readonly. Pressing
CtrlCmd+SorFile > Savewill now save both sides of the diff editor.Feedback welcome, it will be in tomorrows insider build: https://code.visualstudio.com/insiders/
jharrang commentedon Dec 4, 2019
Benjamin Pasero (@bpasero) Thanks for implementing! Now that this is closed, is it possible to finally implement #25887 and #37350? This would address a critically missing piece of editor functionality that has been heavily requested for over two years.
Also mentioning alexandrudima who has been consolidating a number of issues to #25887
Thanks much!