github icon indicating copy to clipboard operation
github copied to clipboard

Option to enable word-diff for staged changes

Open HDembinski opened this issue 4 years ago • 2 comments

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.

HDembinski avatar May 13 '21 11:05 HDembinski

This should be asked in @atom/github

ThatXliner avatar May 13 '21 14:05 ThatXliner

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.

dextertd avatar May 03 '22 17:05 dextertd