Closed engelju closed 8 years ago
Do you use the session feature of Vim; :mksession
somewhere?
Nope, but I figured it out: I used vim-buftabs and that seemed to mess with Lightline. I also tried vim-bufferline but also to no avail. When they are disabled everything works as expected.
Do you know how I could list the open buffers in lightline, or any plugin that would work? I tried using the functions of bufferline as a component, but couldn't quite get it to work.
As the problem is solved now, I'll close this. Thanks for your fast response though!
Here is an example to show the bufferline information in the statusline of lightline.
let g:lightline = {
\ 'active': {
\ 'right': [ [ 'lineinfo' ], [ 'bufferline' ], [ 'fileformat', 'fileencoding', 'filetype' ] ]
\ },
\ 'component_function': {
\ 'bufferline': 'LightlineBufferLine'
\ }
\ }
function! LightlineBufferLine()
let info = get(g:, 'bufferline_status_info', {})
if empty(info)
return ''
endif
return info.before . info.current . info.after
endfunction
That works wonderfully, thank you so much!
hey, im having this same issue and i do use the mksession feature
Add this to your vimrc and you will be fine:
set laststatus=2
When I start a new vim instance, the statusbar stays the default and only changes into lightline after I open another file or call
lightline#enable()
immediatly after starting the vim session.I have
laststatus=2
set.:scriptnames
/startuptime
outputIt seems to me that it does get loaded, but somehow it's not getting enabled. Do you know how I could further debug this?