Merge pull request #562 from jby/new_lightline_settings
Modified setings of lightline to match the README in the lightline project
This commit is contained in:
@@ -1,19 +1,40 @@
|
||||
let g:lightline = {
|
||||
\ 'colorscheme': 'solarized',
|
||||
\ 'active': {
|
||||
\ 'left': [ [ 'mode' ],
|
||||
\ 'left': [ [ 'mode', 'paste' ],
|
||||
\ [ 'fugitive', 'readonly', 'filename', 'modified' ] ]
|
||||
\ },
|
||||
\ 'component': {
|
||||
\ 'readonly': '%{&readonly?"⭤":""}',
|
||||
\ 'fugitive': '%{exists("*fugitive#head")?fugitive#head():""}'
|
||||
\ },
|
||||
\ 'component_visible_condition': {
|
||||
\ 'fugitive': '(exists("*fugitive#head") && ""!=fugitive#head())'
|
||||
\ 'component_function': {
|
||||
\ 'fugitive': 'MyFugitive',
|
||||
\ 'readonly': 'MyReadonly',
|
||||
\ 'filename': 'MyFilename',
|
||||
\ },
|
||||
\ 'separator': { 'left': '⮀', 'right': '⮂' },
|
||||
\ 'subseparator': { 'left': '⮁', 'right': '⮃' }
|
||||
\ }
|
||||
|
||||
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
|
||||
|
||||
" Use status bar even with single buffer
|
||||
set laststatus=2
|
||||
|
||||
Reference in New Issue
Block a user