add comment highlight visibility function
This commit is contained in:
parent
2f9388a650
commit
fde3ddf2be
16
init.vim
16
init.vim
|
@ -173,6 +173,21 @@ function! AleLinterStatus() abort "{{{
|
|||
\)
|
||||
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{{{
|
||||
|
@ -333,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