commit 844b48614c9a786eb7a2a8120001d1cc499332b2
parent 4f3a3d7d2d58afa287af7be0c07c869caf05e06b
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Mon, 27 Jan 2020 14:49:12 +0100
vim: goyo underline misspelled words
Former-commit-id: f49c33db5c9bbdd98ed9fa1ecb8128256f57be60
Diffstat:
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/vim/autoload/goyo_custom.vim b/vim/autoload/goyo_custom.vim
@@ -7,14 +7,20 @@ function! goyo_custom#update_ruler()
" Adding the call to wordcount() here didn't work, so had to use a helper variable
setlocal rulerformat=%20(%{g:goyo_wordcount}\ words%=\ %{strftime(\"%H:%M\")}%)
endfunction
+function! goyo_custom#modify_hlgroups()
+ hi! spellbad gui=underline cterm=underline
+ hi! spellcap gui=underline cterm=underline
+endfunction
function! goyo_custom#goyo_enter()
call goyo_custom#update_ruler()
setlocal textwidth=0 wrapmargin=5 wrap
+ call goyo_custom#modify_hlgroups()
setlocal ruler
autocmd BufEnter,BufReadPost,BufWritePost,TextChanged,TextChangedI * call goyo_custom#update_ruler()
endfunction
function! goyo_custom#goyo_leave()
setlocal textwidth< wrapmargin< wrap< rulerformat< ruler<
autocmd! BufEnter,BufReadPost,BufWritePost,TextChanged,TextChangedI
+ execute "colorscheme ".g:colors_name
unlet g:goyo_wordcount
endfunction