-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Support word wrap in the diff editor #11387
Comments
Yes, word wrapping was never supported in diff editor -- has to do with aligning lines that wrap. |
Got it 👍 |
It would be nice if the diff editor also respected the word wrap setting. Another related issue: |
I work on Latex projects with long paragraphs of text. Find and replace is almost unusable without word wrap. I can see how it wouldn't bother me much on my python projects maybe, but in Latex it's terrible. |
I'm a huge fan of vscode, but this is a blocker for me when it comes to using it for diffing. |
Is there some way to configure VS Code so that it launches an external Diff Tool instead (e.g. Araxis Merge) as a temporary workaround until this issue is fixed? (Even if I have to manually click a button to launch the the 3rd party diff tool.) -edit-
and then installed the "GitDiffer" VSCode extension and now when I right click a file in the Source Control tab of my VSCode window, the "Launch difftool for ..." context menu item will then launch Araxis Merge. Multiple selection doesn't work though (cannot select all changed files and load all of their diffs) but this is a good enough workaround for now. |
@alexandrudima If aligning lines is the blocker for this request, then the "flowing lines" diff view mentioned in #25887 would solve this, right? |
Are there any updates related to this issue? |
I'm trying to diff MD files and the lack of word wrap support makes it pretty much impossible. :( |
Same problem here, can't work on Latex diffs. |
Yes, this is a huge issue, makes it unuseable for a lot of diffing. :( |
A good solution about aligning would be to break the line at any character, as opposed to breaking only between words, actually that is how I have my Vim setup, it is good for small screens. Example: This (breaking always at exactly 80-char):
Instead of this (breaking on last word separator before 80-char):
|
@pumpkinlink I wouldn't mind that as an option, but don't think it should be the default. I like what Github's split view does https://github.com/w3c/ServiceWorker/pull/1229/files?diff=split. |
I would also like to know if there are any updates on this issue. Comparing files is very difficult at the moment due to the lack of word wrap in the Git diff view. Has anyone found any workarounds? |
@alexandrudima re:
The thing is, it doesn't work with inline diffs, either. Don't know if that would be easier to implement, but I'd take this half-solution any time.
|
I don't see the relation. |
At least until word wrapping it done it should be possible to work with long lines if you can see the changes inline |
Word diff would be somewhat useful to me, but it's not as important as line wrapping. You get something approximating word diff anyway, because VSCode highlights the changed characters as well as the changed lines. (The funny thing is that VSCode highlights changed characters but doesn't wrap lines. Atom wraps lines but doesn't highlight changed characters. When comparing documentation files with long lines, you just can't win!) |
Instead of using an external diff tool with VSCode, the |
@frodal sorry but looks like it doesn't work properly (for two in-memory documents at least): |
@SergeyMatsiupa have you tried changing the settings of |
This looks nice. Could you provide instructions how to get the wrapping work like on your second screenshot? |
@technic see my previous post: #11387 (comment) |
I think the initial intention of this feature request is rather to display the differences of a long line auto-wrapped in a multi-line, without making changes in the code, i.e. inserting new lines. The Rewrap extension seems to insert new lines!? |
I totally approve @floschl objection. |
I'm impressed that this issue just hangs in here for 4 years now. |
I also would like this feature added... |
This issue also makes it impossible to diff fountain documents. Although this issue applies to any type of markup really, which means it isn't exactly an edge case or anything. Why is something like this on the backlog? The original issue has got over 300 likes and was opened when vscode 1.4.0 was released - there's been 46 feature updates since. What other community support would be necessary for this to at least be looked at? |
Can't wait to see it :) |
Thank you! |
@alexdima should this be working in Insiders now? I selected two files in Explorer, chose "Compare Selected", then tried to toggle word wrap from the View menu. It gave me an info notification"Cannot toggle word wrap in a diff editor." Version: 1.52.0-insider (user setup) |
@gjsjohnmurray Yes, I've also seen that the toggle action in the View menu does not work yet. Setting word wrap via settings works for now. Let's track in #110468 |
It's finally working! 😲 🤩 |
I cannot get word wrapping enabled in a diff editor when using that action but maybe there is no word wrapping for diff editors?
The text was updated successfully, but these errors were encountered: