feat: polish colorscheme
new grey is old darkgrey -> new darkgrey is darker change statusline File colors change statusline filename retrieving -> if the window is small, only show the tail
This commit is contained in:
parent
6d890c08be
commit
5be11c47dc
@ -4,7 +4,7 @@
|
||||
" Maintainer: David JULIEN <swy7ch@protonmail.com>
|
||||
" Website: https://github.com/vim/vim/blob/master/src/syntax.c
|
||||
" License: Vim License (see `:help license`)
|
||||
" Last Updated: Fri 08 May 2020 12:27:32 PM CEST
|
||||
" Last Updated: Fri 08 May 2020 06:50:58 PM CEST
|
||||
|
||||
" Generated by Colortemplate v2.0.0
|
||||
|
||||
@ -49,13 +49,13 @@ hi! link NvimInternalError ErrorMsg
|
||||
|
||||
if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
let g:terminal_ansi_colors = ['#1d2021', '#b73935', '#5a8471', '#f7a583',
|
||||
\ '#458588', '#b16286', '#7cafa3', '#7c6f64', '#a89984', '#ea6962',
|
||||
\ '#458588', '#b16286', '#7cafa3', '#373737', '#7c6f64', '#ea6962',
|
||||
\ '#89b594', '#ffeca3', '#7daea3', '#d3869b', '#ace5d7', '#ebdbb2']
|
||||
hi Normal guifg=#ebdbb2 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Terminal guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Cursor guifg=#1d2021 guibg=#ebdbb2 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLine guifg=NONE guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLine guifg=NONE guibg=#373737 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorColumn guifg=NONE guibg=#373737 guisp=NONE gui=NONE cterm=NONE
|
||||
hi CursorLineNr guifg=#f7a583 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Pmenu guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSel guifg=#1d2021 guibg=#89b594 guisp=NONE gui=bold cterm=bold
|
||||
@ -66,7 +66,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
hi TabLine guifg=#ebdbb2 guibg=#7c6f64 guisp=NONE gui=underline cterm=underline
|
||||
hi Todo guifg=#1d2021 guibg=#f7a583 guisp=NONE gui=bold cterm=bold
|
||||
hi ColorColumn guifg=NONE guibg=#b73935 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Conceal guifg=#a89984 guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Conceal guifg=#7c6f64 guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffAdd guifg=#1d2021 guibg=#5a8471 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffChange guifg=#1d2021 guibg=#f7a583 guisp=NONE gui=NONE cterm=NONE
|
||||
hi DiffDelete guifg=#1d2021 guibg=#b73935 guisp=NONE gui=bold cterm=bold
|
||||
@ -81,7 +81,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
hi ModeMsg guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi MoreMsg guifg=#89b594 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi NonText guifg=#7daea3 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi PmenuSbar guifg=#1d2021 guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuSbar guifg=#1d2021 guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi PmenuThumb guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Question guifg=#89b594 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Search guifg=#1d2021 guibg=#f7a583 guisp=NONE gui=NONE cterm=NONE
|
||||
@ -90,7 +90,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
hi TabLineFill guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi TabLineSel guifg=NONE guibg=NONE guisp=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi Title guifg=#f7a583 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi VertSplit guifg=#ebdbb2 guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi VertSplit guifg=#7c6f64 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Visual guifg=#ffeca3 guibg=#b16286 guisp=NONE gui=NONE cterm=NONE
|
||||
hi VisualNOS guifg=NONE guibg=NONE guisp=NONE gui=bold,underline ctermfg=NONE ctermbg=NONE cterm=bold,underline
|
||||
hi WarningMsg guifg=#ea6962 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
@ -106,8 +106,8 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
hi Type guifg=#ffeca3 guibg=NONE guisp=NONE gui=bold cterm=bold
|
||||
hi Underlined guifg=#458588 guibg=NONE guisp=NONE gui=underline cterm=underline
|
||||
hi! link lCursor Cursor
|
||||
hi ToolbarLine guifg=NONE guibg=#a89984 guisp=NONE gui=NONE cterm=NONE
|
||||
hi ToolbarButton guifg=#1d2021 guibg=#a89984 guisp=NONE gui=bold cterm=bold
|
||||
hi ToolbarLine guifg=NONE guibg=#7c6f64 guisp=NONE gui=NONE cterm=NONE
|
||||
hi ToolbarButton guifg=#1d2021 guibg=#7c6f64 guisp=NONE gui=bold cterm=bold
|
||||
hi StatusLine guifg=NONE guibg=NONE guisp=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi StatusLineTerm guifg=#1d2021 guibg=#89b594 guisp=NONE gui=bold cterm=bold
|
||||
hi StatusLineNC guifg=#7c6f64 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
@ -117,7 +117,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
|
||||
hi InsertMode guifg=#1d2021 guibg=#ace5d7 guisp=NONE gui=bold cterm=bold
|
||||
hi ReplaceMode guifg=#1d2021 guibg=#ea6962 guisp=NONE gui=bold cterm=bold
|
||||
hi CommandMode guifg=#ebdbb2 guibg=#1d2021 guisp=NONE gui=bold cterm=bold
|
||||
hi File guifg=#d3869b guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi File guifg=#ebdbb2 guibg=#373737 guisp=NONE gui=NONE cterm=NONE
|
||||
hi FileType guifg=#7cafa3 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
hi Percent guifg=#7c6f64 guibg=NONE guisp=NONE gui=NONE cterm=NONE
|
||||
hi Column guifg=#7cafa3 guibg=#1d2021 guisp=NONE gui=NONE cterm=NONE
|
||||
@ -141,7 +141,7 @@ if s:t_Co >= 256
|
||||
hi TabLine ctermfg=229 ctermbg=243 cterm=underline
|
||||
hi Todo ctermbg=216 cterm=bold
|
||||
hi ColorColumn ctermfg=NONE ctermbg=160 cterm=NONE
|
||||
hi Conceal ctermfg=239 ctermbg=243 cterm=NONE
|
||||
hi Conceal ctermfg=243 ctermbg=243 cterm=NONE
|
||||
hi DiffAdd ctermbg=2 cterm=NONE
|
||||
hi DiffChange ctermbg=216 cterm=NONE
|
||||
hi DiffDelete ctermbg=160 cterm=NONE
|
||||
@ -156,7 +156,7 @@ if s:t_Co >= 256
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi MoreMsg ctermfg=71 ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=24 ctermbg=NONE cterm=NONE
|
||||
hi PmenuSbar ctermbg=239 cterm=NONE
|
||||
hi PmenuSbar ctermbg=243 cterm=NONE
|
||||
hi PmenuThumb ctermfg=229 cterm=NONE
|
||||
hi Question ctermfg=71 ctermbg=NONE cterm=NONE
|
||||
hi Search ctermbg=216 cterm=NONE
|
||||
@ -165,7 +165,7 @@ if s:t_Co >= 256
|
||||
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi Title ctermfg=216 ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=229 ctermbg=243 cterm=NONE
|
||||
hi VertSplit ctermfg=243 cterm=NONE
|
||||
hi Visual ctermfg=230 ctermbg=138 cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
|
||||
hi WarningMsg ctermfg=203 ctermbg=NONE cterm=NONE
|
||||
@ -181,8 +181,8 @@ if s:t_Co >= 256
|
||||
hi Type ctermfg=230 ctermbg=NONE cterm=NONE
|
||||
hi Underlined ctermfg=24 ctermbg=NONE cterm=underline
|
||||
hi! link lCursor Cursor
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=239 cterm=NONE
|
||||
hi ToolbarButton ctermbg=239 cterm=bold
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=243 cterm=NONE
|
||||
hi ToolbarButton ctermbg=243 cterm=bold
|
||||
hi StatusLine ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi StatusLineTerm ctermbg=71 cterm=bold
|
||||
hi StatusLineNC ctermfg=243 cterm=NONE
|
||||
@ -192,7 +192,7 @@ if s:t_Co >= 256
|
||||
hi InsertMode ctermbg=81 cterm=bold
|
||||
hi ReplaceMode ctermbg=203 cterm=bold
|
||||
hi CommandMode ctermfg=229 cterm=bold
|
||||
hi File ctermfg=181 cterm=NONE
|
||||
hi File ctermfg=229 ctermbg=243 cterm=NONE
|
||||
hi FileType ctermfg=30 cterm=NONE
|
||||
hi Percent ctermfg=243 ctermbg=NONE cterm=NONE
|
||||
hi Column ctermfg=30 cterm=NONE
|
||||
@ -216,7 +216,7 @@ if s:t_Co >= 8
|
||||
hi TabLine ctermfg=LightYellow ctermbg=Grey cterm=underline
|
||||
hi Todo ctermfg=Black ctermbg=LightRed cterm=bold
|
||||
hi ColorColumn ctermfg=NONE ctermbg=DarkRed cterm=NONE
|
||||
hi Conceal ctermfg=DarkGrey ctermbg=Grey cterm=NONE
|
||||
hi Conceal ctermfg=Grey ctermbg=Grey cterm=NONE
|
||||
hi DiffAdd ctermfg=Black ctermbg=DarkGreen cterm=NONE
|
||||
hi DiffChange ctermfg=Black ctermbg=LightRed cterm=NONE
|
||||
hi DiffDelete ctermfg=Black ctermbg=DarkRed cterm=NONE
|
||||
@ -231,7 +231,7 @@ if s:t_Co >= 8
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi MoreMsg ctermfg=Green ctermbg=NONE cterm=NONE
|
||||
hi NonText ctermfg=DarkCyan ctermbg=NONE cterm=NONE
|
||||
hi PmenuSbar ctermfg=Black ctermbg=DarkGrey cterm=NONE
|
||||
hi PmenuSbar ctermfg=Black ctermbg=Grey cterm=NONE
|
||||
hi PmenuThumb ctermfg=LightYellow ctermbg=Black cterm=NONE
|
||||
hi Question ctermfg=Green ctermbg=NONE cterm=NONE
|
||||
hi Search ctermfg=Black ctermbg=LightRed cterm=NONE
|
||||
@ -240,7 +240,7 @@ if s:t_Co >= 8
|
||||
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold
|
||||
hi Title ctermfg=LightRed ctermbg=NONE cterm=NONE
|
||||
hi VertSplit ctermfg=LightYellow ctermbg=Grey cterm=NONE
|
||||
hi VertSplit ctermfg=Grey ctermbg=Black cterm=NONE
|
||||
hi Visual ctermfg=White ctermbg=DarkMagenta cterm=NONE
|
||||
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=bold,underline
|
||||
hi WarningMsg ctermfg=Red ctermbg=NONE cterm=NONE
|
||||
@ -256,8 +256,8 @@ if s:t_Co >= 8
|
||||
hi Type ctermfg=White ctermbg=NONE cterm=NONE
|
||||
hi Underlined ctermfg=DarkBlue ctermbg=NONE cterm=underline
|
||||
hi! link lCursor Cursor
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=DarkGrey cterm=NONE
|
||||
hi ToolbarButton ctermfg=Black ctermbg=DarkGrey cterm=bold
|
||||
hi ToolbarLine ctermfg=NONE ctermbg=Grey cterm=NONE
|
||||
hi ToolbarButton ctermfg=Black ctermbg=Grey cterm=bold
|
||||
hi StatusLine ctermfg=NONE ctermbg=NONE cterm=NONE
|
||||
hi StatusLineTerm ctermfg=Black ctermbg=Green cterm=bold
|
||||
hi StatusLineNC ctermfg=Grey ctermbg=Black cterm=NONE
|
||||
@ -267,7 +267,7 @@ if s:t_Co >= 8
|
||||
hi InsertMode ctermfg=Black ctermbg=LightBlue cterm=bold
|
||||
hi ReplaceMode ctermfg=Black ctermbg=Red cterm=bold
|
||||
hi CommandMode ctermfg=LightYellow ctermbg=Black cterm=bold
|
||||
hi File ctermfg=Magenta ctermbg=Black cterm=NONE
|
||||
hi File ctermfg=LightYellow ctermbg=Grey cterm=NONE
|
||||
hi FileType ctermfg=DarkCyan ctermbg=Black cterm=NONE
|
||||
hi Percent ctermfg=Grey ctermbg=NONE cterm=NONE
|
||||
hi Column ctermfg=DarkCyan ctermbg=Black cterm=NONE
|
||||
@ -282,8 +282,8 @@ endif
|
||||
" Color: darkblue #458588 24 DarkBlue
|
||||
" Color: darkmagenta #b16286 138 DarkMagenta
|
||||
" Color: darkcyan #7cafa3 30 DarkCyan
|
||||
" Color: grey #a89984 239 DarkGrey
|
||||
" Color: darkgrey #7c6f64 243 Grey
|
||||
" Color: grey #7c6f64 243 Grey
|
||||
" Color: darkgrey #373737 243 Grey
|
||||
" Color: red #ea6962 203 Red
|
||||
" Color: green #89b594 71 Green
|
||||
" Color: yellow #ffeca3 230 White
|
||||
|
@ -110,11 +110,11 @@ source $XDG_CONFIG_HOME/nvim/statusline.vim
|
||||
augroup statusline
|
||||
autocmd!
|
||||
autocmd VimEnter *
|
||||
\ call UpdateInactiveWindows()
|
||||
\ call UpdateInactiveWindows()
|
||||
autocmd VimEnter,WinEnter,BufWinEnter *
|
||||
\ call RefreshStatusLine('active')
|
||||
\ call RefreshStatusLine('active')
|
||||
autocmd WinLeave *
|
||||
\ call RefreshStatusLine('inactive')
|
||||
\ call RefreshStatusLine('inactive')
|
||||
augroup END
|
||||
|
||||
"" Text, tab and indent
|
||||
|
@ -18,8 +18,8 @@ Color: orange #f7a583 216 LightRed
|
||||
Color: darkblue #458588 24 DarkBlue
|
||||
Color: darkmagenta #b16286 138 DarkMagenta
|
||||
Color: darkcyan #7cafa3 30 DarkCyan
|
||||
Color: grey #a89984 239 DarkGrey
|
||||
Color: darkgrey #7c6f64 243 Grey
|
||||
Color: grey #7c6f64 243 Grey
|
||||
Color: darkgrey #373737 243 Grey
|
||||
Color: red #ea6962 203 Red
|
||||
Color: green #89b594 71 Green
|
||||
Color: yellow #ffeca3 230 White
|
||||
@ -70,11 +70,11 @@ Background: dark
|
||||
|
||||
# Default highlight groups for dark variant {{{
|
||||
|
||||
# NOTE: Vim's default does not define Normal
|
||||
|
||||
Variant: gui 256 8
|
||||
|
||||
# Group Foreground Background Attributes
|
||||
# NOTE: Vim's default does not define Normal
|
||||
Normal white none
|
||||
Terminal white black
|
||||
Cursor black white
|
||||
@ -87,11 +87,10 @@ SpellBad red none underline
|
||||
SpellCap blue none
|
||||
SpellLocal cyan none
|
||||
SpellRare orange none
|
||||
TabLine white darkgrey underline
|
||||
TabLine white grey underline
|
||||
Todo black orange bold
|
||||
ColorColumn none darkred
|
||||
Conceal grey darkgrey
|
||||
# NOTE: Vim's default does not define Cursor/lCursor in the terminal
|
||||
Conceal grey grey
|
||||
DiffAdd black darkgreen
|
||||
DiffChange black orange
|
||||
DiffDelete black darkred g=bold
|
||||
@ -101,7 +100,7 @@ ErrorMsg yellow darkred bold
|
||||
FoldColumn orange darkblue
|
||||
Folded orange darkblue
|
||||
IncSearch none none reverse
|
||||
LineNr darkgrey none
|
||||
LineNr grey none
|
||||
MatchParen none none reverse
|
||||
ModeMsg none none bold
|
||||
MoreMsg green none g=bold
|
||||
@ -115,13 +114,13 @@ SpecialKey cyan none
|
||||
TabLineFill none none
|
||||
TabLineSel none none bold
|
||||
Title orange none g=bold
|
||||
VertSplit white darkgrey
|
||||
VertSplit grey black
|
||||
Visual yellow darkmagenta
|
||||
VisualNOS none none underline,bold
|
||||
WarningMsg red none
|
||||
WildMenu black green bold
|
||||
# Other conventional group names (see `:help group-name`)
|
||||
Comment darkgrey none
|
||||
Comment grey none
|
||||
Constant magenta none
|
||||
Error white red bold
|
||||
Identifier blue none bold
|
||||
@ -141,14 +140,14 @@ ToolbarButton black grey bold
|
||||
# Statusline
|
||||
StatusLine none none
|
||||
StatusLineTerm black green bold
|
||||
StatusLineNC darkgrey black
|
||||
StatusLineNC grey black
|
||||
Buffer green black
|
||||
NormalMode black green bold
|
||||
VisualMode black magenta bold
|
||||
InsertMode black cyan bold
|
||||
ReplaceMode black red bold
|
||||
CommandMode white black bold
|
||||
File magenta black
|
||||
File white darkgrey
|
||||
FileType darkcyan black
|
||||
Percent darkgrey none
|
||||
Percent grey none
|
||||
Column darkcyan black
|
||||
|
@ -13,7 +13,7 @@ function! CurrentMode()
|
||||
return g:currentmode[mode()]
|
||||
endfunction
|
||||
|
||||
functio! ModeColor()
|
||||
function! ModeColor()
|
||||
|
||||
let g:modecolor={
|
||||
\ 'n' : '%#NormalMode#',
|
||||
@ -29,6 +29,17 @@ functio! ModeColor()
|
||||
return g:modecolor[mode()]
|
||||
endfunction
|
||||
|
||||
function! FileName()
|
||||
let g:name=' '
|
||||
if winwidth(0)>70
|
||||
let g:name.='%F'
|
||||
else
|
||||
let g:name.='%t'
|
||||
endif
|
||||
|
||||
return g:name
|
||||
endfunction
|
||||
|
||||
function! StatusLine()
|
||||
|
||||
let l:statusline=''
|
||||
@ -39,41 +50,41 @@ function! StatusLine()
|
||||
|
||||
" Show current mode
|
||||
let l:statusline.=ModeColor()
|
||||
let l:statusline.=CurrentMode()
|
||||
let l:statusline.=CurrentMode().'%*'
|
||||
|
||||
" File path, absolute or relative to ~/
|
||||
let l:statusline.='%#File#'
|
||||
let l:statusline.=' %F'
|
||||
let l:statusline.=FileName()
|
||||
|
||||
let l:statusline .= "%{&readonly?'!':''}"
|
||||
let l:statusline .= "%{&modified?'*':''}"
|
||||
let l:statusline .= "%{&readonly?' [RO]':''}"
|
||||
let l:statusline .= "%{&modified?' [MO]':''}"
|
||||
|
||||
" Truncate line here
|
||||
let l:statusline.='%<'
|
||||
|
||||
" Separation point between left and right aligned items.
|
||||
let l:statusline.='%='
|
||||
let l:statusline.='%=%* '
|
||||
|
||||
let l:statusline.='%#SpellLocal#'
|
||||
let l:statusline.="%{&spell?'[SPELL]\ ':'\ '}"
|
||||
let l:statusline.="%{&spell?'[SPELL] ':''}%*"
|
||||
|
||||
" Filetype
|
||||
let l:statusline.='%#FileType#'
|
||||
let l:statusline.="%{&filetype!=#''?&filetype.' ':'none '}"
|
||||
let l:statusline.="%{&filetype!=#''?&filetype.' ':'none '}%*"
|
||||
|
||||
" Encoding & Fileformat
|
||||
let l:statusline.='%#WarningMsg#'
|
||||
let l:statusline.="%{&fileencoding!='utf-8'?'['.&fileencoding.'] ':''}"
|
||||
let l:statusline.="%{&fileencoding!='utf-8'?'['.&fileencoding.'] ':' '}%*"
|
||||
|
||||
|
||||
"setlocal statusline.=%#FileFormat#
|
||||
"setlocal statusline.=\ %-7([%{&fileformat}]%)
|
||||
|
||||
let l:statusline.='%#Percent#'
|
||||
let l:statusline.='%03.p%%'
|
||||
let l:statusline.='%03.p%%%* '
|
||||
|
||||
" Location of cursor in line
|
||||
let l:statusline.=' %#Column#'
|
||||
let l:statusline.='%#Column#'
|
||||
let l:statusline.='-%c-'
|
||||
|
||||
return l:statusline
|
||||
@ -89,8 +100,8 @@ function! StatusLineNC()
|
||||
" File name
|
||||
let l:statusline.=' %t'
|
||||
|
||||
let l:statusline .= "%{&readonly?'!':''}"
|
||||
let l:statusline .= "%{&modified?'*':''}"
|
||||
let l:statusline .= "%{&readonly?' [MO]':''}"
|
||||
let l:statusline .= "%{&modified?' [RO]':''}"
|
||||
|
||||
" Truncate line here
|
||||
let l:statusline.='%<'
|
||||
@ -106,17 +117,17 @@ function! StatusLineNC()
|
||||
endfunction
|
||||
|
||||
function! UpdateInactiveWindows()
|
||||
for winnum in range(1, winnr('$'))
|
||||
if winnum != winnr()
|
||||
call setwinvar(winnum, '&statusline', '%!StatusLineNC()')
|
||||
endif
|
||||
endfor
|
||||
for winnum in range(1, winnr('$'))
|
||||
if winnum != winnr()
|
||||
call setwinvar(winnum, '&statusline', '%!StatusLineNC()')
|
||||
endif
|
||||
endfor
|
||||
endfunction
|
||||
|
||||
function! RefreshStatusLine(mode)
|
||||
if a:mode == "active"
|
||||
setlocal statusline=%!StatusLine()
|
||||
else
|
||||
setlocal statusline=%!StatusLineNC()
|
||||
endif
|
||||
if a:mode == "active"
|
||||
setlocal statusline=%!StatusLine()
|
||||
else
|
||||
setlocal statusline=%!StatusLineNC()
|
||||
endif
|
||||
endfunction
|
||||
|
Reference in New Issue
Block a user