aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar dylnmc <dylnmc@gmail.com>2017-09-25 21:02:55 -0400
committerGravatar dylnmc <dylnmc@gmail.com>2017-09-25 21:02:55 -0400
commit81fef161be188b947b01d6d40f52186ce8c4ce12 (patch)
tree0c03728aa5ed0788cfdd5c17b81de7d578dbf268
parent27d335be8e9110bcc21e769737ee7289f50eeecd (diff)
downloadnord-vim-81fef161be188b947b01d6d40f52186ce8c4ce12.tar.gz
fixes #37 and provides statusline configuration
configure statusline with ```vim let g:nord_statusline_uniform = 1 ``` default is to use brighter background (`0`), but easily configurable with by setting `g:nord_statusline_uniform` to `1`) NOTE: this does not work with airline or lightline
-rw-r--r--README.md14
-rwxr-xr-xcolors/nord.vim13
2 files changed, 25 insertions, 2 deletions
diff --git a/README.md b/README.md
index 7c74a8e..45cd795 100644
--- a/README.md
+++ b/README.md
@@ -114,6 +114,20 @@ It can be enabled by setting the `g:nord_italic_comments` variable to `1`.
let g:nord_italic_comments = 1
```
+### Uniform StatusLine Backgrund
+
+Allow StatusLine backgrounds to be uniform.
+
+By default, Nord uses a slightly brighter background for the current split buffer.
+This is designed to draw attention to the currently active buffer without being
+distracting.
+
+However, if the user desires the backgrounds to be a uniform color,
+`g:nord_statusline_uniform` can be set to `1` as follows:
+```vim
+let g:nord_statusline_uniform = 1
+```
+
## Plugin Support
Nord Vim provides support for many third-party language- and the UI plugins.
diff --git a/colors/nord.vim b/colors/nord.vim
index 3b30d93..1c394ef 100755
--- a/colors/nord.vim
+++ b/colors/nord.vim
@@ -52,6 +52,10 @@ if !exists('g:nord_italic_comments')
let g:nord_italic_comments = 0
endif
+if !exists('g:nord_statusline_uniform')
+ let g:nord_statusline_uniform = 0
+endif
+
function! s:hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
let l:attr = a:attr
if g:nord_italic_comments == 0 && l:attr ==? 'italic'
@@ -127,8 +131,13 @@ call s:hi("ErrorMsg", s:nord4_gui, s:nord11_gui, "NONE", s:nord11_term, "", "")
call s:hi("ModeMsg", s:nord4_gui, "", "", "", "", "")
call s:hi("MoreMsg", s:nord4_gui, "", "", "", "", "")
call s:hi("Question", s:nord4_gui, "", "NONE", "", "", "")
-call s:hi("StatusLine", s:nord4_gui, s:nord0_gui, s:nord8_term, s:nord1_term, "NONE", "")
-call s:hi("StatusLineNC", s:nord4_gui, s:nord0_gui, s:nord8_term, "NONE", "NONE", "")
+if g:nord_statusline_uniform == 0
+ call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
+ call s:hi("StatusLineNC", s:nord4_gui, s:nord1_gui, "NONE", s:nord1_term, "NONE", "")
+else
+ call s:hi("StatusLine", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "NONE", "")
+ call s:hi("StatusLineNC", s:nord4_gui, s:nord3_gui, "NONE", s:nord3_term, "NONE", "")
+endif
call s:hi("WarningMsg", s:nord0_gui, s:nord13_gui, s:nord1_term, s:nord13_term, "", "")
call s:hi("WildMenu", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "", "")