Compare commits
No commits in common. "fde3ddf2be95941c787cc235cadf703b70371dbd" and "84becc3de94538d778e800960e8c4ca1cd538ba9" have entirely different histories.
fde3ddf2be
...
84becc3de9
43
init.vim
43
init.vim
|
@ -17,6 +17,7 @@ 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
|
||||||
|
@ -160,34 +161,6 @@ 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
|
|
||||||
"}}}
|
|
||||||
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{{{
|
"#commands{{{
|
||||||
" TrimWhitespace{{{
|
" TrimWhitespace{{{
|
||||||
|
@ -334,6 +307,19 @@ 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 {{{
|
||||||
|
@ -348,7 +334,6 @@ nnoremap <silent> <cr>s :syntax on<cr>
|
||||||
nnoremap <silent> <cr>S :syntax off<cr>
|
nnoremap <silent> <cr>S :syntax off<cr>
|
||||||
" miscallaneous {{{
|
" miscallaneous {{{
|
||||||
nnoremap <cr>l :colorscheme paper-custom<cr>
|
nnoremap <cr>l :colorscheme paper-custom<cr>
|
||||||
nnoremap <cr>c :call ToggleHighlights()<cr>
|
|
||||||
nnoremap <cr>d :colorscheme monotonous-dark<cr>
|
nnoremap <cr>d :colorscheme monotonous-dark<cr>
|
||||||
nnoremap 0 ^
|
nnoremap 0 ^
|
||||||
nnoremap <silent><space>cs :let @/=""<cr>
|
nnoremap <silent><space>cs :let @/=""<cr>
|
||||||
|
|
Loading…
Reference in New Issue