aboutsummaryrefslogtreecommitdiff
path: root/vimrc
diff options
context:
space:
mode:
authorJuan J. Martinez <jjm@usebox.net>2019-05-08 21:50:33 +0100
committerJuan J. Martinez <jjm@usebox.net>2022-05-29 22:57:28 +0100
commit3899cdec768772416d1afc976727915222c7f4cc (patch)
tree706d62fb40397240411fdb8c05ac6a63ae378749 /vimrc
parent21ed0a581eda5f436575813f231a374f90b437a0 (diff)
downloaddotnvim-3899cdec768772416d1afc976727915222c7f4cc.tar.gz
dotnvim-3899cdec768772416d1afc976727915222c7f4cc.zip
Add cursorline, better extra whitespace
Diffstat (limited to 'vimrc')
-rw-r--r--vimrc11
1 files changed, 9 insertions, 2 deletions
diff --git a/vimrc b/vimrc
index e817833..93c8319 100644
--- a/vimrc
+++ b/vimrc
@@ -71,9 +71,16 @@ let g:gruvbox_italic=1
let g:gruvbox_contrast_dark="hard"
colorscheme gruvbox
+" show cursor line
+set cursorline
+
" EOL whitespace
-hi WhitespaceEOL ctermbg=red guibg=red
-match WhitespaceEOL /\s\+$/
+highlight ExtraWhitespace ctermbg=red guibg=red
+match ExtraWhitespace /\s\+$/
+autocmd BufWinEnter * match ExtraWhitespace /\s\+$/
+autocmd InsertEnter * match ExtraWhitespace /\s\+\%#\@<!$/
+autocmd InsertLeave * match ExtraWhitespace /\s\+$/
+autocmd BufWinLeave * call clearmatches()
" for tmux, screen, etc
set t_ut=