Commit ede04b78 authored by Adrien Dorsaz's avatar Adrien Dorsaz Committed by Adrien Dorsaz
Browse files

vim: add current time to statusline

parent ab6f065b
......@@ -139,6 +139,10 @@ function! LightlineFileformat()
return winwidth(0) > 150 ? &fileformat : ''
endfunction
function! LightlineTime()
return winwidth(0) > 150 ? strftime('%H:%M') : ''
endfunction
function! LightlineFiletype()
return winwidth(0) > 150 && &filetype !=# '' ? &filetype : ''
endfunction
......@@ -154,13 +158,14 @@ endfunction
let g:lightline = {
\ 'colorscheme': 'one',
\ 'active': {
\ 'left': [ [ 'mode', 'paste' ],
\ [ 'readonly', 'filename' ] ],
\ 'left': [ [ 'mode', 'paste', 'time' ],
\ [ 'readonly', 'filename', 'currentfunction' ] ],
\ 'right': [ [ 'lineinfo' ],
\ [ 'percent' ],
\ [ 'fileformat', 'fileencoding', 'filetype' ] ],
\ },
\ 'component_function': {
\ 'time': 'LightlineTime',
\ 'currentfunction': 'CocCurrentFunction',
\ 'filename': 'LightlineFileName',
\ 'fileformat': 'LightlineFileformat',
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment