aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-09-14 15:43:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-09-14 15:43:36 +1200
commitafa95909847d1f1107a15f2cc9f7879393f817ad (patch)
tree8c872cc11f7336eeffb80dfb37159a566ca90737
parentf06e6def650cf62af7a0bd7e067c578d2ba6fa8f (diff)
parent3c6db4d4647fe03fce8e9b763df5b599cdd976e5 (diff)
downloaddotfiles-afa95909847d1f1107a15f2cc9f7879393f817ad.tar.gz
Merge branch 'release/v1.70.0'v1.70.0
* release/v1.70.0: Bump VERSION Revert "Replace paste_open.vim with paste_hook....
-rw-r--r--VERSION4
-rw-r--r--vim/plugin/paste_hook.vim44
-rw-r--r--vim/vimrc9
3 files changed, 5 insertions, 52 deletions
diff --git a/VERSION b/VERSION
index 751cb688..6c4b4c61 100644
--- a/VERSION
+++ b/VERSION
@@ -1,2 +1,2 @@
-tejr dotfiles v1.69.0
-Wed Sep 12 11:47:40 UTC 2018
+tejr dotfiles v1.70.0
+Fri Sep 14 03:43:35 UTC 2018
diff --git a/vim/plugin/paste_hook.vim b/vim/plugin/paste_hook.vim
deleted file mode 100644
index 5697a198..00000000
--- a/vim/plugin/paste_hook.vim
+++ /dev/null
@@ -1,44 +0,0 @@
-"
-" paste_hook.vim: Mapping target to add a self-clearing autocmd that unsets
-" 'paste' on the next InsertLeave event, if set; intended for use as a prefix
-" to an insert session to make it happen in paste mode.
-"
-" Author: Tom Ryder <tom@sanctum.geek.nz
-" Copyright: Same as Vim itself
-"
-if exists('g:loaded_paste_hook') || &compatible
- finish
-endif
-if !exists('##InsertLeave')
- finish
-endif
-let g:loaded_paste_hook = 1
-
-" Start paste mode, establish hook to end it
-function! s:Set() abort
-
- " Do nothing if 'paste' is already set
- if &paste
- return
- endif
-
- " Turn on 'paste' mode and set up the hook to clear it the next time we
- " leave insert mode
- set paste
- augroup paste_hook
- autocmd!
- autocmd InsertLeave * call s:Clear()
- augroup END
-
-endfunction
-
-" End paste mode and clear the hook that called us
-function! s:Clear() abort
- set nopaste
- autocmd! paste_hook InsertLeave
-endfunction
-
-" Set up mappings
-nnoremap <silent> <unique>
- \ <Plug>(PasteHook)
- \ :<C-U>call <SID>Set()<CR>
diff --git a/vim/vimrc b/vim/vimrc
index 523bace5..d017dfe9 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -331,15 +331,12 @@ if exists(':xnoremap')
endif
" \o opens a line below in paste mode
-nmap <Bslash>o <Plug>(PasteHook)o
+nmap <Bslash>o <Plug>(PasteOpenBelow)
" \O opens a line above in paste mode
-nmap <Bslash>O <Plug>(PasteHook)O
+nmap <Bslash>O <Plug>(PasteOpenAbove)
-" \p toggles paste mode, or sets a hook if plugin available
+" \p toggles paste mode
nnoremap <Bslash>p :<C-U>set paste! paste?<CR>
-if &loadplugins
- nmap <Bslash>p <Plug>(PasteHook)
-endif
" \q formats the current paragraph
nnoremap <Bslash>q gqap