I like to manually expand tabs in magit-diff (on whenever I'm looking at diff 
output).

This avoids line misalignment due to the prepended "+/-", which would change 
depending on the positions of spaces and tabs. If you're using 
whitespace-cleanup and tabs are involved, it happens frequently, and you never 
know if the indentation changed and/or there's a misalignment.

I don't think there would be any side-effect, since there's no point in editing 
the diff itself, except when you're searching in the diff for literal tabs.

I currently do it with:

(add-hook 'magit-refresh-buffer-hook
          (lambda ()
            (when (eq major-mode 'magit-diff-mode)
              (let ((inhibit-read-only t))
                (replace-string "\t" "        " nil (point-min) (point-max))))))

Comments?

-- 
You received this message because you are subscribed to the Google Groups 
"magit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to