aboutsummaryrefslogtreecommitdiff
path: root/vim/vimrc
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2018-09-12 23:47:04 +1200
committerTom Ryder <tom@sanctum.geek.nz>2018-09-12 23:47:04 +1200
commitdce5abc0724428f805562dd32bf9a71677d55aaa (patch)
treedf93d503f9082a1b335fb6735ba4ec9cac2f1424 /vim/vimrc
parentMerge branch 'hotfix/v1.68.1' into develop (diff)
downloaddotfiles-dce5abc0724428f805562dd32bf9a71677d55aaa.tar.gz
dotfiles-dce5abc0724428f805562dd32bf9a71677d55aaa.zip
Replace paste_open.vim with paste_hook.vim
Still a little experimental; no documentation (or distribution) yet.
Diffstat (limited to 'vim/vimrc')
-rw-r--r--vim/vimrc9
1 files changed, 6 insertions, 3 deletions
diff --git a/vim/vimrc b/vim/vimrc
index d017dfe9..523bace5 100644
--- a/vim/vimrc
+++ b/vim/vimrc
@@ -331,12 +331,15 @@ if exists(':xnoremap')
endif
" \o opens a line below in paste mode
-nmap <Bslash>o <Plug>(PasteOpenBelow)
+nmap <Bslash>o <Plug>(PasteHook)o
" \O opens a line above in paste mode
-nmap <Bslash>O <Plug>(PasteOpenAbove)
+nmap <Bslash>O <Plug>(PasteHook)O
-" \p toggles paste mode
+" \p toggles paste mode, or sets a hook if plugin available
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