move AleLinterStatus to functions section

This commit is contained in:
Ray Elliott 2020-07-31 15:22:03 +01:00
parent 84becc3de9
commit 2f9388a650
1 changed files with 13 additions and 14 deletions

View File

@ -17,7 +17,6 @@ function! <SID>SynStack()"{{{
endfunc endfunc
nmap <space>pp :call <SID>SynStack()<CR> nmap <space>pp :call <SID>SynStack()<CR>
"}}} "}}}
function! s:RunShellCommand(cmdline) abort"{{{ function! s:RunShellCommand(cmdline) abort"{{{
" Shell command " Shell command
" http://vim.wikia.com/wiki/VimTip1599 " http://vim.wikia.com/wiki/VimTip1599
@ -161,6 +160,19 @@ command! -nargs=1 -complete=command Redir silent call Redir(<q-args>)
" :Redir hi ............. show the full output of command ':hi' in a scratch window " :Redir hi ............. show the full output of command ':hi' in a scratch window
" :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window " :Redir !ls -al ........ show the full output of command ':!ls -al' in a scratch window
"}}} "}}}
function! AleLinterStatus() abort "{{{
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '' : printf(
\ '[ %dW %dE ]',
\ all_non_errors,
\ all_errors
\)
endfunction
"}}}
"----------------------------------------------------------------------------}}} "----------------------------------------------------------------------------}}}
"#commands{{{ "#commands{{{
" TrimWhitespace{{{ " TrimWhitespace{{{
@ -307,19 +319,6 @@ set statusline+=%y\
set statusline+=%r\ %m\ %f set statusline+=%r\ %m\ %f
set statusline+=\ set statusline+=\
function! AleLinterStatus() abort
let l:counts = ale#statusline#Count(bufnr(''))
let l:all_errors = l:counts.error + l:counts.style_error
let l:all_non_errors = l:counts.total - l:all_errors
return l:counts.total == 0 ? '' : printf(
\ '[ %dW %dE ]',
\ all_non_errors,
\ all_errors
\)
endfunction
set conceallevel=0 set conceallevel=0
"----------------------------------------------------------------------------}}} "----------------------------------------------------------------------------}}}
" #mappings {{{ " #mappings {{{