aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-08-04 20:42:31 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-08-04 20:42:31 +1200
commit4e9b3a3fa3febd61b13dd0a64ed6943fc5519961 (patch)
tree4def09dd8e8e2dc21275342fb9b490c7fb8f6bad
parent80576742815e5374f4d097229b3ff7ff6a9dc6a5 (diff)
downloaddotfiles-4e9b3a3fa3febd61b13dd0a64ed6943fc5519961.tar.gz
dotfiles-4e9b3a3fa3febd61b13dd0a64ed6943fc5519961.zip
Make insert-mode cursorline ducking configurable
-rw-r--r--vim/plugin/cursorline_current.vim7
1 files changed, 5 insertions, 2 deletions
diff --git a/vim/plugin/cursorline_current.vim b/vim/plugin/cursorline_current.vim
index 1668b69a..a552fe95 100644
--- a/vim/plugin/cursorline_current.vim
+++ b/vim/plugin/cursorline_current.vim
@@ -66,7 +66,10 @@ augroup cursorline_current
autocmd WinEnter * call s:Restore()
" Turn off 'cursorline' when in insert mode
- autocmd InsertEnter * call s:Suspend()
- autocmd InsertLeave * call s:Restore()
+ " Check g:cursorline_current_insert, in case the user doesn't want it
+ if get(g:, 'cursorline_current_insert', 1)
+ autocmd InsertEnter * call s:Suspend()
+ autocmd InsertLeave * call s:Restore()
+ endif
augroup END