From 230c0e4e20f5ec1132603ff4d4730d06f8bfc8cd Mon Sep 17 00:00:00 2001 From: Greg Pfeil Date: Thu, 16 Feb 2012 08:39:49 -0700 Subject: [PATCH] Make region highlighting match VIM. Fixes issue #40. --- solarized-definitions.el | 53 ++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 24 deletions(-) diff --git a/solarized-definitions.el b/solarized-definitions.el index d5da460..fefa220 100644 --- a/solarized-definitions.el +++ b/solarized-definitions.el @@ -93,26 +93,27 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." 3 4)))) (nth index (assoc name solarized-colors))))) - (let ((base03 (find-color 'base03)) - (base02 (find-color 'base02)) - (base01 (find-color 'base01)) - (base00 (find-color 'base00)) - (base0 (find-color 'base0)) - (base1 (find-color 'base1)) - (base2 (find-color 'base2)) - (base3 (find-color 'base3)) - (yellow (find-color 'yellow)) - (orange (find-color 'orange)) - (red (find-color 'red)) - (magenta (find-color 'magenta)) - (violet (find-color 'violet)) - (blue (find-color 'blue)) - (cyan (find-color 'cyan)) - (green (find-color 'green)) - (bold (if solarized-bold 'bold 'normal)) - (underline (if solarized-underline t nil)) - (opt-under nil) - (italic (if solarized-italic 'italic 'normal))) + (let ((base03 (find-color 'base03)) + (base02 (find-color 'base02)) + (base01 (find-color 'base01)) + (base00 (find-color 'base00)) + (base0 (find-color 'base0)) + (base1 (find-color 'base1)) + (base2 (find-color 'base2)) + (base3 (find-color 'base3)) + (yellow (find-color 'yellow)) + (orange (find-color 'orange)) + (red (find-color 'red)) + (magenta (find-color 'magenta)) + (violet (find-color 'violet)) + (blue (find-color 'blue)) + (cyan (find-color 'cyan)) + (green (find-color 'green)) + (bold (if solarized-bold 'bold 'normal)) + (bright-bold (if solarized-bold 'normal 'bold)) + (underline (if solarized-underline t nil)) + (opt-under nil) + (italic (if solarized-italic 'italic 'normal))) (when (eq 'light mode) (rotatef base03 base3) (rotatef base02 base2) @@ -127,15 +128,17 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." (setf back base02 opt-under t))) `((;; basic - (default ((t (:foreground ,base0 ,:background ,back)))) - (cursor + (default ((t (:foreground ,base0 ,:background ,back)))) ; Normal + (cursor ; Cursor ((t (:foreground ,base0 :background ,base03 :inverse-video t)))) (escape-glyph-face ((t (:foreground ,red)))) (fringe ((t (:foreground ,base01 :background ,base02)))) (linum ((t (:foreground ,base01 :background ,base02)))) (header-line ((t (:foreground ,base0 :background ,base2)))) (highlight ((t (:background ,base02)))) - (hl-line ((t (:background ,base02)))) + + (hl-line ; CursorLine + ((t (:background ,base02 :underline ,opt-under)))) (isearch ((t (:foreground ,yellow :inverse-video t)))) (lazy-highlight ((t (:background ,base2 :foreground ,base00)))) (link ((t (:foreground ,violet :underline ,underline)))) @@ -149,7 +152,9 @@ the \"Gen RGB\" column in solarized-definitions.el to improve them further." (mode-line-inactive ((t (:foreground ,base0 :background ,base02 :box (:line-width 1 :color ,base02))))) - (region ((t (:background ,base02)))) + (region ; Visual + ((t (:foreground ,base01 :background ,base03 + :inverse-video t :weight ,bright-bold)))) (secondary-selection ((t (:background ,base02)))) (shadow ((t (:foreground, base01)))) (trailing-whitespace ((t (:foreground ,red :inverse-video t))))