stuff
This commit is contained in:
parent
1888d785b0
commit
e0ea82e1c8
|
@ -30,8 +30,8 @@ augroup linenumbering
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
augroup colorcolumns
|
augroup colorcolumns
|
||||||
autocmd WinEnter * set colorcolumn=80
|
autocmd WinEnter * call SetColorColumn()
|
||||||
autocmd WinLeave * set colorcolumn=0
|
autocmd WinLeave * setlocal colorcolumn=0
|
||||||
augroup END
|
augroup END
|
||||||
|
|
||||||
" Automatically reload .vimrc if chanaged
|
" Automatically reload .vimrc if chanaged
|
||||||
|
|
|
@ -166,25 +166,6 @@ augroup status "{{{
|
||||||
" autocmd InsertChange * setlocal statusline=%!GetStatus(1)
|
" autocmd InsertChange * setlocal statusline=%!GetStatus(1)
|
||||||
augroup END"}}}
|
augroup END"}}}
|
||||||
|
|
||||||
function! GetLinterStatus(key) abort "{{{
|
|
||||||
let l:linter = ale#statusline#Count(bufnr(''))
|
|
||||||
|
|
||||||
return l:linter[a:key]
|
|
||||||
endfunction
|
|
||||||
|
|
||||||
"}}}
|
|
||||||
|
|
||||||
" old linter status function
|
|
||||||
function! LinterStatus() 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 ? 'OK' : printf('%dW %dE', l:all_non_errors, l:all_errors)
|
|
||||||
endfunction
|
|
||||||
"}}}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" vim: foldmethod=marker
|
" vim: foldmethod=marker
|
||||||
|
|
|
@ -54,6 +54,13 @@ if !exists('*RangerExplorer') "{{{
|
||||||
map <space>ra :call RangerExplorer()<CR>
|
map <space>ra :call RangerExplorer()<CR>
|
||||||
endif"}}}
|
endif"}}}
|
||||||
|
|
||||||
|
function! SetColorColumn()"{{{
|
||||||
|
if &buftype == ''
|
||||||
|
setlocal colorcolumn=80
|
||||||
|
endif
|
||||||
|
endfunction
|
||||||
|
"}}}
|
||||||
|
|
||||||
function! GetLinterStatus(key) abort "{{{
|
function! GetLinterStatus(key) abort "{{{
|
||||||
let l:linter = ale#statusline#Count(bufnr(''))
|
let l:linter = ale#statusline#Count(bufnr(''))
|
||||||
|
|
||||||
|
@ -62,4 +69,18 @@ endfunction
|
||||||
|
|
||||||
"}}}
|
"}}}
|
||||||
|
|
||||||
|
" old linter status function
|
||||||
|
function! LinterStatus() 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 ? 'OK' : printf('%dW %dE', l:all_non_errors, l:all_errors)
|
||||||
|
endfunction
|
||||||
|
"}}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
" vim: foldmethod=marker
|
" vim: foldmethod=marker
|
||||||
|
|
Loading…
Reference in New Issue