From 4e9b3a3fa3febd61b13dd0a64ed6943fc5519961 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Sat, 4 Aug 2018 20:42:31 +1200 Subject: Make insert-mode cursorline ducking configurable --- vim/plugin/cursorline_current.vim | 7 +++++-- 1 file 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 -- cgit v1.2.3