diff options
author | 2018-02-17 01:11:44 +0300 | |
---|---|---|
committer | 2018-06-23 08:27:58 +0200 | |
commit | 2508195ad778a3791628044990a3c08dd5fbbc8a (patch) | |
tree | 14fc1a36dccb5bf3df938a691334f6ae7f8e1ce9 | |
parent | 22844c372caa96a501b3993153ce8265adb51812 (diff) | |
download | nord-vim-2508195ad778a3791628044990a3c08dd5fbbc8a.tar.gz |
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.
-rw-r--r-- | README.md | 8 | ||||
-rwxr-xr-x | colors/nord.vim | 10 |
2 files changed, 17 insertions, 1 deletions
@@ -230,6 +230,14 @@ let g:nord_uniform_diff_background = 1 <p align="center"><strong>Colorful backgrounds (default)</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-config-uniform-diff-default.png"/><br><strong>Uniform diff background</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-config-uniform-diff.png"/> </p> +### 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", "", "") |