atom / github

:octocat: Git and GitHub integration for Atom
https://github.atom.io
MIT License
1.12k stars 393 forks source link

Option to enable word-diff for staged changes #2685

Open HDembinski opened 3 years ago

HDembinski commented 3 years ago

Summary

Allow one to use word-diff for staged changes

Motivation

When you write text instead of code, git's normal diff is useless, it usually highlights a whole paragraph since a paragraph is one line. For any kind of normal text (Markdown, LaTeX, documentation), word-diff is preferred as in git diff --word-diff.

It would be great if Atom would automatically use word-diff when you look at the diff of your staged changes in the Git tab on documents which are not note code (.tex, .md, etc.) Currently, it uses the normal diff.

ThatXliner commented 3 years ago

This should be asked in @atom/github

dextertd commented 2 years ago

I was searching for the same preference setting and came across this issue. I hope this can be added to Atom proper.

As a workaround you can install the split-diff package and check the "Show Word Diff" setting - but it doesn't take effect in Atom's "Unstaged Changes" window (to open, click your unstaged file in the Git window). Instead, you have to activate it with a keyboard shortcut (ctrl+alt+t) to pop into its own temporary window.