From 2508195ad778a3791628044990a3c08dd5fbbc8a Mon Sep 17 00:00:00 2001 From: Andrey Polischuk Date: Sat, 17 Feb 2018 01:11:44 +0300 Subject: Match CursorLineNr background to CursorLine A config to allow users to enable background for the line cumber of the current cursor position. It uses the same color as the current line so it appears as a uniform background highlighting. --- README.md | 8 ++++++++ colors/nord.vim | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index e154661..922c281 100644 --- a/README.md +++ b/README.md @@ -230,6 +230,14 @@ let g:nord_uniform_diff_background = 1

Colorful backgrounds (default)

Uniform diff background

+### Highlighting the current line number + +Enables background for line number of the current line the same with text background of the current line. + +```vim +let g:nord_cursor_line_number_coloring = 1 +``` + ## Plugin Support Nord Vim provides support for many third-party language- and UI plugins. diff --git a/colors/nord.vim b/colors/nord.vim index 52ec4a5..379fe6f 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -103,6 +103,10 @@ if !exists("g:nord_uniform_diff_background") let g:nord_uniform_diff_background = 0 endif +if !exists("g:nord_cursor_line_number_background") + let g:nord_cursor_line_number_background = 0 +endif + function! s:hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp) if a:guifg != "" exec "hi " . a:group . " guifg=" . a:guifg @@ -180,7 +184,11 @@ endif "+--- Gutter ---+ call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "") -call s:hi("CursorLineNr", s:nord3_gui, s:nord0_gui, "NONE", "", "", "") +if g:nord_cursor_line_number_background == 0 + call s:hi("CursorLineNr", s:nord3_gui, s:nord0_gui, "NONE", "", "", "") +else + call s:hi("CursorLineNr", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "", "") +endif call s:hi("Folded", s:nord3_gui, s:nord1_gui, s:nord3_term, s:nord1_term, "bold", "") call s:hi("FoldColumn", s:nord3_gui, s:nord0_gui, s:nord3_term, "NONE", "", "") call s:hi("SignColumn", s:nord1_gui, s:nord0_gui, s:nord1_term, "NONE", "", "") -- cgit v1.2.3-70-g09d2 From 50ec737b8fda0fd0a679738099c34037e8149704 Mon Sep 17 00:00:00 2001 From: Arctic Ice Studio Date: Sat, 23 Jun 2018 08:01:51 +0200 Subject: Fix inconsistent line number foreground color in GUI mode In term mode the number uses nord4, but in GUI mode nord3 was used instead. This was not intended and has been changed to match the term mode style. GH-100 --- README.md | 10 +++++++--- ...ot-config-cursor-line-number-background-default.png | Bin 0 -> 115113 bytes assets/scrot-config-cursor-line-number-background.png | Bin 0 -> 115088 bytes colors/nord.vim | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 assets/scrot-config-cursor-line-number-background-default.png create mode 100644 assets/scrot-config-cursor-line-number-background.png diff --git a/README.md b/README.md index 922c281..c56eb13 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,7 @@ Nord Vim is a 16 colorspace theme build to run in GUI- and terminal mode with su - [Uniform Status Lines](#uniform-status-lines) - [Comment Contrast](#comment-contrast) - [Uniform diff Background](#uniform-diff-background) + - [Line number background](#line-number-background) - [Plugin Support](#plugin-support) - [UI Plugins](#ui-plugins) - [Language Plugins](#language-plugins) @@ -230,14 +231,17 @@ let g:nord_uniform_diff_background = 1

Colorful backgrounds (default)

Uniform diff background

-### Highlighting the current line number +### Line number background -Enables background for line number of the current line the same with text background of the current line. +Enables background for the line number of the current line. ```vim -let g:nord_cursor_line_number_coloring = 1 +let g:nord_cursor_line_number_background = 1 ``` +

No background (default)

Enabled background
+

+ ## Plugin Support Nord Vim provides support for many third-party language- and UI plugins. diff --git a/assets/scrot-config-cursor-line-number-background-default.png b/assets/scrot-config-cursor-line-number-background-default.png new file mode 100644 index 0000000..1aa90ac Binary files /dev/null and b/assets/scrot-config-cursor-line-number-background-default.png differ diff --git a/assets/scrot-config-cursor-line-number-background.png b/assets/scrot-config-cursor-line-number-background.png new file mode 100644 index 0000000..86ef534 Binary files /dev/null and b/assets/scrot-config-cursor-line-number-background.png differ diff --git a/colors/nord.vim b/colors/nord.vim index 379fe6f..6281c77 100755 --- a/colors/nord.vim +++ b/colors/nord.vim @@ -185,7 +185,7 @@ endif "+--- Gutter ---+ call s:hi("CursorColumn", "", s:nord1_gui, "NONE", s:nord1_term, "", "") if g:nord_cursor_line_number_background == 0 - call s:hi("CursorLineNr", s:nord3_gui, s:nord0_gui, "NONE", "", "", "") + call s:hi("CursorLineNr", s:nord4_gui, s:nord0_gui, "NONE", "", "", "") else call s:hi("CursorLineNr", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "", "") endif -- cgit v1.2.3-70-g09d2