2016-05-14 20:22:57 +08:00
|
|
|
" =============================================================================
|
|
|
|
" Filename: plugin/lightline.vim
|
|
|
|
" Author: itchyny
|
|
|
|
" License: MIT License
|
2022-08-08 21:45:56 +08:00
|
|
|
" Last Change: 2021/11/21 22:54:41.
|
2016-05-14 20:22:57 +08:00
|
|
|
" =============================================================================
|
|
|
|
|
2020-12-05 05:15:32 +08:00
|
|
|
if exists('g:loaded_lightline') || v:version < 703
|
2016-05-14 20:22:57 +08:00
|
|
|
finish
|
|
|
|
endif
|
|
|
|
let g:loaded_lightline = 1
|
|
|
|
|
|
|
|
let s:save_cpo = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
|
|
|
augroup lightline
|
|
|
|
autocmd!
|
2022-08-08 21:45:56 +08:00
|
|
|
autocmd WinEnter,BufEnter,SessionLoadPost,FileChangedShellPost * call lightline#update()
|
2019-08-22 23:36:17 +08:00
|
|
|
if !has('patch-8.1.1715')
|
|
|
|
autocmd FileType qf call lightline#update()
|
|
|
|
endif
|
2018-07-04 18:53:25 +08:00
|
|
|
autocmd SessionLoadPost * call lightline#highlight()
|
|
|
|
autocmd ColorScheme * if !has('vim_starting') || expand('<amatch>') !=# 'macvim'
|
|
|
|
\ | call lightline#update() | call lightline#highlight() | endif
|
2016-05-14 20:22:57 +08:00
|
|
|
augroup END
|
|
|
|
|
2019-08-22 23:36:17 +08:00
|
|
|
" This quickfix option was introduced at Vim 85850f3a5ef9, which is the commit
|
|
|
|
" just before 8.1.1715. Before this patch, autocmd FileType is required to
|
|
|
|
" overwrite the statusline of the quickfix and location windows.
|
|
|
|
let g:qf_disable_statusline = 1
|
|
|
|
|
2016-05-14 20:22:57 +08:00
|
|
|
let &cpo = s:save_cpo
|
|
|
|
unlet s:save_cpo
|