move AleLinterStatus to functions section
This commit is contained in:
parent
84becc3de9
commit
2f9388a650
27
init.vim
27
init.vim
|
@ -17,7 +17,6 @@ function! <SID>SynStack()"{{{
|
|||
endfunc
|
||||
nmap <space>pp :call <SID>SynStack()<CR>
|
||||
"}}}
|
||||
|
||||
function! s:RunShellCommand(cmdline) abort"{{{
|
||||
" Shell command
|
||||
" 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 !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{{{
|
||||
" TrimWhitespace{{{
|
||||
|
@ -307,19 +319,6 @@ set statusline+=%y\
|
|||
set statusline+=%r\ %m\ %f
|
||||
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
|
||||
"----------------------------------------------------------------------------}}}
|
||||
" #mappings {{{
|
||||
|
|
Loading…
Reference in New Issue