this repo has no description
at master 962 B view raw
1scriptencoding utf-8 2 3" displays a flag if there are unseen quickfix errors 4function! statusline#quickfix() abort 5 let l:ret = '' 6 let l:ret .= get(g:, 'quickfix_pending') ? 'D' :' ' 7 let l:ret .= exists('g:asyncdo') || exists('w:asyncdo') ? 'R' : ' ' 8 9 return l:ret 10endfunction 11 12function! statusline#relpath() abort 13 return expand('%:~:.') 14endfunction 15 16function! statusline#filename() abort 17 if isdirectory(expand('%')) 18 return 'Dirvish' 19 elseif &buftype ==# 'nofile' && (&bufhidden ==# 'hidden' || &bufhidden ==# 'delete') 20 return 'Scratch' 21 else 22 return fnamemodify(statusline#relpath(), ':t') 23 endif 24endfunction 25 26function! statusline#path() abort 27 return fnamemodify(statusline#relpath(), ':h') 28endfunction 29 30function! statusline#modified() abort 31 return &modified ? ' +' : '' 32endfunction 33 34function! statusline#quickfix_name() abort 35 return qf#IsQfWindow(winnr()) ? 'QuickFix' : 'Location' 36endfunction