Skip to content

Commit

Permalink
Improve matching parent group style for cterm
Browse files Browse the repository at this point in the history
A more detailed review of this change can be found in the PR thread:
#78 (review)

The changes from the previous commit are good, but there haven still
been some edge cases which had to be coverd. It applied for the "gui"
mode or when the "termguicolors" option is set, but the "cterm" mode is
still affected by the problem (1).

When changing the cterm definitions it had to be keept in mind that there
is no "nord0_term" variable. If set to "NONE" (to make it kind of
"transparent" and use the main background color) there is another edge
case when the "cursorline" option is enabled so only the foreground color
of the matching elements would change to "nord8" (2, 3).

To optimally improve the highlighting for both "gui" and "cterm" mode
"nord3" will be used as background color for the matching element which
doesn't conflict with the "cursorline" color and also stands out in order
to see the matching element (4, 5, 6)

References:

  (1) https://user-images.githubusercontent.com/7836623/34409455-3370fada-ebca-11e7-9ed8-d83c3a9c5055.png
  (2) https://user-images.githubusercontent.com/7836623/34409493-6221fdd4-ebca-11e7-97c4-703ca9e5198a.png
  (3) https://user-images.githubusercontent.com/7836623/34409508-74f913a2-ebca-11e7-8dd2-896ac809e23b.png
  (4) https://user-images.githubusercontent.com/7836623/34409567-d8c64bfc-ebca-11e7-919a-1a40cf146084.png
  (5) https://user-images.githubusercontent.com/7836623/34409570-dec9c1aa-ebca-11e7-8e68-32b79ec0d7c9.png
  (6) https://user-images.githubusercontent.com/7836623/34409581-eddcefc8-ebca-11e7-9ab7-29b80704d836.gif

GH-75
  • Loading branch information
arcticicestudio committed Dec 30, 2017
1 parent 678a75e commit f6b7b20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ call s:hi("CursorLine", "", s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
call s:hi("Error", s:nord0_gui, s:nord11_gui, "", s:nord11_term, "", "")
call s:hi("iCursor", s:nord0_gui, s:nord4_gui, "", "NONE", "", "")
call s:hi("LineNr", s:nord3_gui, s:nord0_gui, s:nord3_term, "NONE", "", "")
call s:hi("MatchParen", s:nord8_gui, s:nord0_gui, s:nord1_term, s:nord8_term, "", "")
call s:hi("MatchParen", s:nord8_gui, s:nord0_gui, s:nord8_term, s:nord3_term, "", "")
call s:hi("NonText", s:nord2_gui, "", s:nord3_term, "", "", "")
call s:hi("Normal", s:nord4_gui, s:nord0_gui, "NONE", "NONE", "", "")
call s:hi("PMenu", s:nord4_gui, s:nord2_gui, "NONE", s:nord1_term, "NONE", "")
Expand Down

0 comments on commit f6b7b20

Please sign in to comment.