aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-16 02:32:37 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-16 02:32:37 +1200
commit8c66ce1908b0eee8e767d2d2bffd87c30fb2e83b (patch)
tree59d4e24ac2c942207741aa735022ba8972e45750
parent4dec92131a0e4bdd3782a450c530fbe7f22c8955 (diff)
downloaddotfiles-8c66ce1908b0eee8e767d2d2bffd87c30fb2e83b.tar.gz
Refactor paste_insert#()
-rw-r--r--vim/autoload/paste_insert.vim22
1 files changed, 10 insertions, 12 deletions
diff --git a/vim/autoload/paste_insert.vim b/vim/autoload/paste_insert.vim
index fe7cb35f..b02d8e7a 100644
--- a/vim/autoload/paste_insert.vim
+++ b/vim/autoload/paste_insert.vim
@@ -1,14 +1,12 @@
-augroup paste_insert
- autocmd!
-augroup END
-
function! paste_insert#() abort
- autocmd! paste_insert
- autocmd paste_insert CursorHold,CursorMoved,User <buffer>
- \ set nopaste paste?
- \|autocmd! paste_insert
- autocmd paste_insert InsertEnter <buffer>
- \ set paste paste?
- \|autocmd paste_insert InsertLeave <buffer>
- \ doautocmd paste_insert User
+ augroup paste_insert
+ autocmd!
+ autocmd CursorHold,CursorMoved,User <buffer>
+ \ set nopaste paste?
+ \|autocmd! paste_insert
+ autocmd InsertEnter <buffer>
+ \ set paste paste?
+ \|autocmd paste_insert InsertLeave <buffer>
+ \ doautocmd paste_insert User
+ augroup END
endfunction