diff options
author | Max Christian Pohle | 2019-10-13 13:47:17 +0200 |
---|---|---|
committer | Max Christian Pohle | 2019-10-13 13:47:17 +0200 |
commit | 5ffd36adcb5e2aa352609a3d4e005b3e99173442 (patch) | |
tree | d92a75df87f63313b3a91e8279d39aadb37471e4 /plugin/statusline.vim | |
parent | ba1f099db5afeedb323c05127df1cc34df85ec85 (diff) | |
download | vim-karlmarks-5ffd36adcb5e2aa352609a3d4e005b3e99173442.tar.bz2 vim-karlmarks-5ffd36adcb5e2aa352609a3d4e005b3e99173442.zip |
Refactored 'splash' a lot & minor fixes in statusline
Diffstat (limited to 'plugin/statusline.vim')
-rw-r--r-- | plugin/statusline.vim | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugin/statusline.vim b/plugin/statusline.vim index dc98a71..e6f175d 100644 --- a/plugin/statusline.vim +++ b/plugin/statusline.vim | |||
@@ -58,12 +58,13 @@ augroup MAX_FANCYLINE | |||
58 | \ .'%#StatusLineHighlight#' | 58 | \ .'%#StatusLineHighlight#' |
59 | \ .'%#'.a:highlight_group.'#' | 59 | \ .'%#'.a:highlight_group.'#' |
60 | \ .g:symbol_screen_edge | 60 | \ .g:symbol_screen_edge |
61 | \ .'%(%w%h%q%)'.' '.l:mode.' '.g:status_sym_sep_start | 61 | \ .'%{&buftype != "" ? " ".&buftype : ""}' |
62 | \ .' '.l:mode.g:status_sym_sep_start | ||
62 | \ .'%{argc() > 1 ? " ".(argidx() + 1).":".argc()." ".g:status_sym_sep_start : ""}' | 63 | \ .'%{argc() > 1 ? " ".(argidx() + 1).":".argc()." ".g:status_sym_sep_start : ""}' |
63 | \ .'%{haslocaldir() ? fnamemodify(getcwd(), ":.:~")." " :""}' | 64 | \ .'%{haslocaldir() ? fnamemodify(getcwd(), ":.:~")." " :""}' |
64 | \ .'%{&readonly ? " 🔒" : ""}' | 65 | \ .'%{&readonly ? " 🔒" : ""}' |
65 | \ .'%{&modified ? " 💾 " : ""}' | 66 | \ .'%{&modified ? " 💾 " : ""}' |
66 | \ .'%{winbufnr(0)." "}' | 67 | \ .'%{" [".winbufnr(0)."] "}' |
67 | \ .'%{bufname("%") == "" ? "" : fnamemodify(expand("%"), ":~:.")}' | 68 | \ .'%{bufname("%") == "" ? "" : fnamemodify(expand("%"), ":~:.")}' |
68 | \ .'%{&titlestring ? has("nvim") ? b:term_title:expand(&titlestring) : "" }' | 69 | \ .'%{&titlestring ? has("nvim") ? b:term_title:expand(&titlestring) : "" }' |
69 | \ .'%{exists("w:quickfix_title") ? w:quickfix_title : ""}' | 70 | \ .'%{exists("w:quickfix_title") ? w:quickfix_title : ""}' |
@@ -111,7 +112,7 @@ augroup MAX_FANCYLINE | |||
111 | \ .g:status_sym_start | 112 | \ .g:status_sym_start |
112 | \ .'%(%#'.a:highlight_group.'#%)' | 113 | \ .'%(%#'.a:highlight_group.'#%)' |
113 | \ .' ' | 114 | \ .' ' |
114 | \ .'%-3(%)' | 115 | \ .'%-2(%)' |
115 | \ .'%(%#'.a:highlight_group.'#%)' | 116 | \ .'%(%#'.a:highlight_group.'#%)' |
116 | \ .'%(%{v:servername} %{v:this_session}%)' | 117 | \ .'%(%{v:servername} %{v:this_session}%)' |
117 | \ .g:status_sym_sep_end.' ' | 118 | \ .g:status_sym_sep_end.' ' |
@@ -136,10 +137,11 @@ augroup MAX_FANCYLINE | |||
136 | highlight! StatusLine cterm=reverse | 137 | highlight! StatusLine cterm=reverse |
137 | " exec 'highlight! User3 guifg=#D2A032 guibg='.l:fgcolor | 138 | " exec 'highlight! User3 guifg=#D2A032 guibg='.l:fgcolor |
138 | endfunction | 139 | endfunction |
140 | call ApplyColorScheme() | ||
141 | |||
139 | " apply colors from the loaded colorscheme... | 142 | " apply colors from the loaded colorscheme... |
140 | " when changing the colorscheme also apply new colors to the statusbar... | 143 | " when changing the colorscheme also apply new colors to the statusbar... |
141 | autocmd VimEnter,ColorScheme * call ApplyColorScheme() | 144 | autocmd ColorScheme * call ApplyColorScheme() |
142 | |||
143 | autocmd WinEnter * setlocal statusline=%!UpdateStatus(g:group_active) | 145 | autocmd WinEnter * setlocal statusline=%!UpdateStatus(g:group_active) |
144 | autocmd WinLeave * setlocal statusline< | 146 | autocmd WinLeave * setlocal statusline< |
145 | augroup END " MAX_FANCYLINE | 147 | augroup END " MAX_FANCYLINE |