50 lines
1.1 KiB
Lua
50 lines
1.1 KiB
Lua
vim.cmd([[
|
|
set laststatus=3
|
|
set statusline=
|
|
set statusline+=%1*
|
|
set statusline+=%{StatuslineMode()}
|
|
set statusline+=\
|
|
set statusline+=|
|
|
set statusline+=\
|
|
set statusline+=%2*
|
|
set statusline+=%F
|
|
set statusline+=%=
|
|
set statusline+=%3*
|
|
set statusline+=%l
|
|
set statusline+=\
|
|
set statusline+=/
|
|
set statusline+=\
|
|
set statusline+=%L
|
|
set statusline+=\
|
|
set statusline+=\
|
|
set statusline+=|
|
|
set statusline+=\
|
|
set statusline+=%{strftime('%c')}
|
|
hi User1 ctermbg=black ctermfg=blue guibg=black guifg=blue
|
|
hi User9 ctermbg=black ctermfg=white guibg=black guifg=white
|
|
hi User2 ctermbg=black ctermfg=green guibg=black guifg=green
|
|
hi User3 ctermbg=black ctermfg=white guibg=black guifg=white
|
|
|
|
function! StatuslineMode()
|
|
let l:mode=mode()
|
|
if l:mode==#"n"
|
|
return "NORMAL"
|
|
elseif l:mode==?"v"
|
|
return "VISUAL"
|
|
elseif l:mode==#"i"
|
|
return "INSERT"
|
|
elseif l:mode==#"R"
|
|
return "REPLACE"
|
|
elseif l:mode==?"s"
|
|
return "SELECT"
|
|
elseif l:mode==#"t"
|
|
return "TERMINAL"
|
|
elseif l:mode==#"c"
|
|
return "COMMAND"
|
|
elseif l:mode==#"!"
|
|
return "SHELL"
|
|
endif
|
|
endfunction
|
|
:call timer_start(1000, {-> execute(':let &stl=&stl')}, {'repeat': -1})
|
|
]])
|