Compare commits
2 Commits
84becc3de9
...
fde3ddf2be
Author | SHA1 | Date |
---|---|---|
Ray Elliott | fde3ddf2be | |
Ray Elliott | 2f9388a650 |
43
init.vim
43
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,34 @@ 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
|
||||
"}}}
|
||||
function! ToggleHighlights() abort "{{{
|
||||
if ! exists('b:toggle_highlights_state')
|
||||
" state 1 is normal, state 0 is faded
|
||||
let b:toggle_highlights_state = 1
|
||||
else
|
||||
let b:toggle_highlights_state = ! b:toggle_highlights_state
|
||||
endif
|
||||
|
||||
if b:toggle_highlights_state == 1
|
||||
hi Comment guifg=#9d9d9d
|
||||
else
|
||||
hi Comment guifg=#d6d6d6
|
||||
endif
|
||||
endfunction
|
||||
"}}}
|
||||
"----------------------------------------------------------------------------}}}
|
||||
"#commands{{{
|
||||
" TrimWhitespace{{{
|
||||
|
@ -307,19 +334,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 {{{
|
||||
|
@ -334,6 +348,7 @@ nnoremap <silent> <cr>s :syntax on<cr>
|
|||
nnoremap <silent> <cr>S :syntax off<cr>
|
||||
" miscallaneous {{{
|
||||
nnoremap <cr>l :colorscheme paper-custom<cr>
|
||||
nnoremap <cr>c :call ToggleHighlights()<cr>
|
||||
nnoremap <cr>d :colorscheme monotonous-dark<cr>
|
||||
nnoremap 0 ^
|
||||
nnoremap <silent><space>cs :let @/=""<cr>
|
||||
|
|
Loading…
Reference in New Issue