diff options
| author | Syndamia <kamen@syndamia.com> | 2023-02-25 13:03:43 +0200 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2023-02-25 13:03:43 +0200 |
| commit | 41ced2df478b90c34e6cccb74004ab2a69e498a2 (patch) | |
| tree | 8ddc156720b5abe4c55c31a24a870e2fadfb473d /.vim | |
| parent | fff516829df42b43b20c5165f342255eb0a641f4 (diff) | |
| download | dotfiles-41ced2df478b90c34e6cccb74004ab2a69e498a2.tar dotfiles-41ced2df478b90c34e6cccb74004ab2a69e498a2.tar.gz dotfiles-41ced2df478b90c34e6cccb74004ab2a69e498a2.zip | |
[.vim/mp/sl] Moved all highlight groups to their own function and call it on load and colorscheme
Diffstat (limited to '.vim')
| -rw-r--r-- | .vim/miniplugins/statusline.vim | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/.vim/miniplugins/statusline.vim b/.vim/miniplugins/statusline.vim index 980a65b..de3aac3 100644 --- a/.vim/miniplugins/statusline.vim +++ b/.vim/miniplugins/statusline.vim @@ -13,6 +13,19 @@ let rightmcap = '' let g:activesl = '' let g:inactivesl = '' +" Colors {{{ + autocmd ColorScheme * call SLCreateHighlightGroups() + + function! SLCreateHighlightGroups() + hi SLMode ctermfg=1 ctermbg=0 + hi SLModeC ctermfg=1 ctermbg=0 + + hi SLRowCol ctermfg=238 ctermbg=244 + hi SLRowColC ctermfg=244 ctermbg=239 + endfunction + call SLCreateHighlightGroups() +" }}} + " Mode {{{ " Values are, in order, for: normal (default), insert, replace, visual modes " [ctermfg, ctermbg] @@ -25,9 +38,6 @@ let g:inactivesl = '' let g:modestring = '' - autocmd ColorScheme * hi SLMode ctermfg=1 ctermbg=0 - autocmd ColorScheme * hi SLModeC ctermfg=1 ctermbg=0 - function! SLModeSetter() let cm = mode() let ind = 0 @@ -85,9 +95,6 @@ let g:inactivesl = '' " }}} " Line and column count {{{ - autocmd ColorScheme * hi SLRowCol ctermfg=238 ctermbg=244 - autocmd ColorScheme * hi SLRowColC ctermfg=244 ctermbg=239 - let g:_linecol = '%#SLRowColC#%{leftcap}%#SLRowCol#%l:%c%#SLRowColC#%{rightcap}' let g:activesl ..= g:_linecol let g:inactivesl ..= g:_linecol |
