Skip to content

Commit

Permalink
Add theme config for bolder vertical split line
Browse files Browse the repository at this point in the history
Previously the `VertSplit` (1) (`:help VertSplit`) key used `nord1` as
background color by default making the line appear to be very lumpy.
This commit changes this style to use `nord0` as bavkground instead to
visually merge with the background so only the separator charaters are
a visual indiciator for the split line whih makes it look more
lightweight and unclutters the overall appeareance.

To allow user who liked the previous implementation to keep the style
this commit also adds a new `nord_bold_vertical_split_line` theme config
that can be assigned to `1` to achieve the legacy design.

The README also include information and hints how to change the
separator character by customizing Vim's `fillchars` (2)
(`:help fillchars`) variable.

References:
  (1) http://vimdoc.sourceforge.net/htmldoc/syntax.html#hl-VertSplit
  (2) http://vimdoc.sourceforge.net/htmldoc/options.html#'fillchars'

nordthemeGH-132
  • Loading branch information
arcticicestudio committed Apr 14, 2019
1 parent d2774cb commit 1ddc782
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Nord Vim is a 16 colorspace theme build to run in GUI- and terminal mode with su
- [Comment Contrast](#comment-contrast)
- [Uniform diff Background](#uniform-diff-background)
- [Line number background](#line-number-background)
- [Bold Vertical Split Line](#bold-vertical-split-line)
- [Plugin Support](#plugin-support)
- [UI Plugins](#ui-plugins)
- [Language Plugins](#language-plugins)
Expand Down Expand Up @@ -259,6 +260,20 @@ let g:nord_cursor_line_number_background = 1
<p align="center"><strong>No background (default)</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-config-cursor-line-number-background-default.png"/><br><strong>Enabled background</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-config-cursor-line-number-background.png"/>
</p>

### Bold Vertical Split Line

Enables a bolder vertical split line by using `nord1` as background.

```viml
let g:nord_bold_vertical_split_line = 1
```

To change the separator character used to display the vertical line please see the documentation about Vim's [`fillchars`][vdoc-fillchars] variable: `:help fillchars`

<p align="center"><strong>With base editor background (default)</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-config-bold-vertical-split-line-default.png"/></p>

<p align="center"><strong>With enabled bold <code>nord1</code> background</strong><br><img src="https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-config-bold-vertical-split-line.png"/></p>

## Plugin Support

Nord Vim provides support for many third-party language- and UI plugins.
Expand Down Expand Up @@ -332,3 +347,4 @@ Please report issues/bugs, feature requests and suggestions for improvements to
[scrot-lang-ruby]: https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-lang-ruby.png
[scrot-readme-default-profile]: https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-readme-default-profile.png
[scrot-readme-lazy-profile-change]: https://raw.githubusercontent.com/arcticicestudio/nord-vim/develop/assets/scrot-readme-lazy-profile-change.png
[vdoc-fillchars]: http://vimdoc.sourceforge.net/htmldoc/options.html#'fillchars'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/scrot-config-bold-vertical-split-line.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion colors/nord.vim
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,10 @@ if !exists("g:nord_cursor_line_number_background")
let g:nord_cursor_line_number_background = 0
endif

if !exists("g:nord_bold_vertical_split_line")
let g:nord_bold_vertical_split_line = 0
endif

function! s:hi(group, guifg, guibg, ctermfg, ctermbg, attr, guisp)
if a:guifg != ""
exec "hi " . a:group . " guifg=" . a:guifg
Expand Down Expand Up @@ -248,7 +252,12 @@ call s:hi("TabLineSel", s:nord8_gui, s:nord3_gui, s:nord8_term, s:nord3_term, "N

"+--- Window ---+
call s:hi("Title", s:nord4_gui, "", "NONE", "", "NONE", "")
call s:hi("VertSplit", s:nord2_gui, s:nord1_gui, s:nord3_term, s:nord1_term, "NONE", "")

if g:nord_bold_vertical_split_line == 0
call s:hi("VertSplit", s:nord2_gui, s:nord0_gui, s:nord3_term, "NONE", "NONE", "")
else
call s:hi("VertSplit", s:nord2_gui, s:nord1_gui, s:nord3_term, s:nord1_term, "NONE", "")
endif

"+----------------------+
"+ Language Base Groups +
Expand Down

0 comments on commit 1ddc782

Please sign in to comment.