Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add ediff and improve diff #49

Merged
merged 2 commits into from

3 participants

@vspinu

Hi,

Ediffs are almost completely unreadable, and white non-central chunks are blinding, especially in terminal.

old

With this patch it is still not perfect, but at least readable and not dazzling anymore. It's the best I could get with default solorized colors.

old

Second commit improves the diff colors. I have removed the default diff-added, diff-changed and diff-removed annoying background.

Two reasons:

  1. With background, diffs are more difficult to read.

  2. In magit buffers, where highlighting is used to emphasize the current
    chunk, current chunk actually becomes less highlighted. During movement
    between chunks everything blinks and it is not clear where the central chunk is.

Before:
old

After:
old

vspinu added some commits
@vspinu vspinu Add ediff faces.
 The faces were completely indistinguishable, especially in terminal.
c3edb6f
@vspinu vspinu Remove diff-added, diff-changed and diff-removed annoying backgrounds.
  Two reasons:
    1) With background, diffs are more difficult to read.

    2) In magit buffers, where highlighting is used to emphasize the current
    chunk, current chunk actually becomes less highlighted. During movement
    between chunks everything blinks
6bcf968
@thomasf
Collaborator

Looks very promising!

@thomasf thomasf merged commit 96065f6 into bbatsov:master
@bbatsov
Owner

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 28, 2012
  1. @vspinu

    Add ediff faces.

    vspinu authored
     The faces were completely indistinguishable, especially in terminal.
  2. @vspinu

    Remove diff-added, diff-changed and diff-removed annoying backgrounds.

    vspinu authored
      Two reasons:
        1) With background, diffs are more difficult to read.
    
        2) In magit buffers, where highlighting is used to emphasize the current
        chunk, current chunk actually becomes less highlighted. During movement
        between chunks everything blinks
This page is out of date. Refresh to see the latest.
Showing with 14 additions and 3 deletions.
  1. +14 −3 solarized.el
View
17 solarized.el
@@ -98,6 +98,9 @@
;; Light/Dark adaptive higher/lower contrast accented colors
;; Only use these in exceptional cirmumstances!
+ (solarized-fg-hc (if (eq variant 'light) base3 base03))
+ (solarized-fg-lc (if (eq variant 'light) base03 base3))
+
(yellow-hc (if (eq variant 'light) yellow-d yellow-l))
(yellow-lc (if (eq variant 'light) yellow-l yellow-d))
(orange-hc (if (eq variant 'light) orange-d orange-l))
@@ -300,13 +303,21 @@
`(custom-state ((,class (:foreground ,green))))
;; diff
- `(diff-added ((,class (:foreground ,green))))
- `(diff-changed ((,class (:foreground ,yellow))))
- `(diff-removed ((,class (:foreground ,red))))
+ `(diff-added ((,class (:foreground ,green :background ,solarized-bg))))
+ `(diff-changed ((,class (:foreground ,yellow :background ,solarized-bg))))
+ `(diff-removed ((,class (:foreground ,red :background ,solarized-bg))))
`(diff-header ((,class (:background ,solarized-bg))))
`(diff-file-header
((,class (:background ,solarized-bg :foreground ,solarized-fg :weight bold))))
+ ;; ediff
+ `(ediff-fine-diff-A ((,class (:background ,orange-lc))))
+ `(ediff-fine-diff-B ((,class (:background ,green-lc))))
+ `(ediff-even-diff-A ((,class (:background ,solarized-comments :foreground ,solarized-fg-lc ))))
+ `(ediff-odd-diff-A ((,class (:background ,solarized-comments :foreground ,solarized-fg-hc ))))
+ `(ediff-even-diff-B ((,class (:background ,solarized-comments :foreground ,solarized-fg-hc ))))
+ `(ediff-odd-diff-B ((,class (:background ,solarized-comments :foreground ,solarized-fg-lc ))))
+
;; epc
`(epc:face-title ((,class (:foreground ,magenta :weight bold))))
Something went wrong with that request. Please try again.