2014-01-06 09:09:18 +08:00
|
|
|
let g:lightline = {
|
|
|
|
\ 'colorscheme': 'solarized',
|
2014-03-28 11:44:24 +08:00
|
|
|
\ 'active': {
|
2014-11-11 21:53:28 +08:00
|
|
|
\ 'left': [ [ 'mode', 'paste' ],
|
2014-03-28 11:44:24 +08:00
|
|
|
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
|
|
|
|
\ },
|
2014-11-11 21:53:28 +08:00
|
|
|
\ 'component_function': {
|
|
|
|
\ 'fugitive': 'MyFugitive',
|
|
|
|
\ 'readonly': 'MyReadonly',
|
|
|
|
\ 'filename': 'MyFilename',
|
2014-01-06 09:09:18 +08:00
|
|
|
\ },
|
|
|
|
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
|
|
|
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
|
|
|
\ }
|
2014-10-25 03:56:42 +08:00
|
|
|
|
2014-11-11 21:53:28 +08:00
|
|
|
function! MyReadonly()
|
|
|
|
if &filetype == "help"
|
|
|
|
return ""
|
|
|
|
elseif &readonly
|
|
|
|
return "⭤ "
|
|
|
|
else
|
|
|
|
return ""
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
function! MyFugitive()
|
|
|
|
if exists("*fugitive#head")
|
|
|
|
let _ = fugitive#head()
|
|
|
|
return strlen(_) ? '⭠ '._ : ''
|
|
|
|
endif
|
|
|
|
return ''
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
function! MyFilename()
|
|
|
|
return ('' != MyReadonly() ? MyReadonly() . ' ' : '') .
|
|
|
|
\ ('' != expand('%') ? expand('%') : '[NoName]')
|
|
|
|
endfunction
|
|
|
|
|
2014-10-25 03:56:42 +08:00
|
|
|
" Use status bar even with single buffer
|
|
|
|
set laststatus=2
|