shalimski / swapdiff Goto Github PK
View Code? Open in Web Editor NEWswapdiff Extension for Visual Studio Code
License: MIT License
swapdiff Extension for Visual Studio Code
License: MIT License
Hi,
For some reason I don't have Swap button even after reboot.
The command works though.
After #3 was fixed, you can now only swap two documents if they have been saved as files. A new, unsaved document doesn't get recognized as a document to swap. If you open two new untitled documents, put some text in them, and compare them, then you can't swap the diff.
It seems that the Output, Problems, and Debug Console panels at the bottom of the screen are considered "editors" by VS Code. So when you have one of them open, it gets counted in vscode.window.visibleTextEditors
. This causes the error message "More than 2 visible files, can`t swap it :(" and prevents me from swapping a diff while I have one of those panels open.
Edit: If I disable all other extensions besides swapdiff, it works in the Debug Console and the Problems panel but still not in the Output panel.
Seemingly related:
microsoft/vscode#45188
microsoft/vscode#58869
https://stackoverflow.com/questions/60235689/how-to-distinguish-output-panel-from-other-activetexteditor
Правильно понимаю, что у vscode нет встроенной команды в api чтобы после swapdiffa editor из которого запустили команду сам закрылся?
Hi, I'd like to try out the extension, but I'm using VSCodium, which doesn't have access to the VSCode Marketplace. If you could publish to Open VSX, I would appreciate it, and I'm sure many others using Codium would too :)
The publishing process is documented in the Open VSX Wiki. For more info on Open VSX, see this article.
I'd like to be able to swap diff views between a file and the clipboard
Steps taken:
File: Compare Active File with Clipboard
Swap diff documents
Nothing to swap :(
The use case I have here is I have chatGPT helping me with writing small scripts, and as I get it to output different versions of the code I want to make sure it isn't making modifications elsewhere where I don't see them. Currently, this works but the new version - which is in my clipboard - is displayed on the left pane and I want it on the right pane
VSCode assumes the paradigm that the first file (left panel) is the "older" one in the comparison and the second file (right panel) is the "newer" one - hence marking with color highlights red for "removed" code and green for "added" code.
This paradigm applies both when you manually select 2 files to compare (in specific order first+second) and when you show CVS changes where the first file is read-only instance from a remote repository and the second file is your local copy. So to speak, the red<->green highlights resemble the direction in which the changes are applied.
My long time dev experience made a habit and mindset of mine to expect seeing my pending changes on the left panel and checking them against the right file panel which is the read-only base from the repo. The other way around is really confusing and inconvenient for me. So I really appreciate having the option to swap views, which VSCode should absolutely provide itself !!!
But while swapping both files works fine along with their read-only attribute, it keeps the red highlight on the left and the green on the right. And swapping the files without swapping their color highlights actually leads to even more confusion (as it breaks the perception of the direction of changes) than it takes to flip my mind and wrap it around the assumption that the views are always ordered "(left) old file<->new file (right)"
So pls, consider swapping the color highlights as well (if possible at all?).
Keep up the good work!
Salute
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.