" Lightline config "====================================================================== let g:lightline = { \ 'colorscheme': 'hybrid', \ 'active': { \ 'left': [ [ 'mode', 'paste' ], [ 'fugitive', 'filename' ] ], \ 'right': [ [ 'lineinfo' ], [ 'fileformat', 'fileencoding', 'filetype' ] ] \ }, \ 'component_function': { \ 'modified': 'LightlineModified', \ 'readonly': 'LightlineReadonly', \ 'fugitive': 'LightlineFugitive', \ 'filename': 'LightlineFilename', \ 'fileformat': 'LightlineFileformat', \ 'filetype': 'LightlineFiletype', \ 'fileencoding': 'LightlineFileencoding', \ 'mode': 'LightlineMode', \ } \ } function! LightlineModified() return &ft =~ 'help' ? '' : &modified ? 'ɱ' : &modifiable ? '' : 'ɯ' endfunction function! LightlineReadonly() return &ft !~? 'help' && &readonly ? 'ɹ' : '' endfunction function! LightlineFilename() return ('' != LightlineReadonly() ? LightlineReadonly() . ' ' : '') . \ (&ft == 'unite' ? unite#get_status_string() : \ '' != expand('%:t') ? expand('%:t') : '[No Name]') . \ ('' != LightlineModified() ? ' ' . LightlineModified() : '') endfunction function! LightlineFugitive() if exists("*fugitive#head") let _ = fugitive#head() return strlen(_) ? 'ɓ '._ : '' endif return '' endfunction function! LightlineFileformat() return winwidth(0) > 70 ? &fileformat : '' endfunction function! LightlineFiletype() return winwidth(0) > 70 ? (strlen(&filetype) ? &filetype : 'no ft') : '' endfunction function! LightlineFileencoding() return winwidth(0) > 70 ? (strlen(&fenc) ? &fenc : &enc) : '' endfunction function! LightlineMode() let fname = expand('%:t') return &ft == 'unite' ? 'Unite' : winwidth(0) > 60 ? lightline#mode() : '' endfunction