aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-05-30 20:51:09 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-05-30 20:52:05 +1200
commit26088b3aa50f18be1ba4321236d1c233caba3ec8 (patch)
tree9e4b5a68b53b5c696579224503c851964343afb0
parentFactor out functions into autoload (diff)
downloadvim-cursorline-current-26088b3aa50f18be1ba4321236d1c233caba3ec8.tar.gz
vim-cursorline-current-26088b3aa50f18be1ba4321236d1c233caba3ec8.zip
Strip comments out from plugin file
We'll put some back later on.
-rw-r--r--plugin/cursorline_current.vim26
1 files changed, 10 insertions, 16 deletions
diff --git a/plugin/cursorline_current.vim b/plugin/cursorline_current.vim
index 234450b..cb07ffd 100644
--- a/plugin/cursorline_current.vim
+++ b/plugin/cursorline_current.vim
@@ -11,24 +11,18 @@ if exists('loaded_cursorline_current') || &compatible || v:version < 700
endif
let loaded_cursorline_current = 1
-" Set up hooks for toggling 'cursorline'
augroup cursorline_current
autocmd!
-
- " Turn off 'cursorline' for other windows on load
- autocmd VimEnter * call cursorline_current#Load()
-
- " Turn off 'cursorline' when leaving a window or losing focus. We call the
- " restore again on BufEnter to handle existent local buffer values for the
- " option overwriting the window value (Vim bug?)
- autocmd WinLeave,FocusLost * call cursorline_current#Suspend()
- autocmd BufEnter,WinEnter,FocusGained * call cursorline_current#Restore()
-
- " Turn off 'cursorline' when in insert mode
- " Check g:cursorline_current_insert, in case the user doesn't want it
+ autocmd VimEnter
+ \ * call cursorline_current#Load()
+ autocmd WinLeave,FocusLost
+ \ * call cursorline_current#Suspend()
+ autocmd BufEnter,WinEnter,FocusGained
+ \ * call cursorline_current#Restore()
if get(g:, 'cursorline_current_insert', 1)
- autocmd InsertEnter * call cursorline_current#Suspend()
- autocmd InsertLeave * call cursorline_current#Restore()
+ autocmd InsertEnter
+ \ * call cursorline_current#Suspend()
+ autocmd InsertLeave
+ \ * call cursorline_current#Restore()
endif
-
augroup END