From dce5abc0724428f805562dd32bf9a71677d55aaa Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 12 Sep 2018 23:47:04 +1200 Subject: Replace paste_open.vim with paste_hook.vim Still a little experimental; no documentation (or distribution) yet. --- vim/plugin/paste_hook.vim | 44 ++++++++++++++++++++++++++++++++++++++++++++ vim/vimrc | 9 ++++++--- 2 files changed, 50 insertions(+), 3 deletions(-) create mode 100644 vim/plugin/paste_hook.vim diff --git a/vim/plugin/paste_hook.vim b/vim/plugin/paste_hook.vim new file mode 100644 index 00000000..5697a198 --- /dev/null +++ b/vim/plugin/paste_hook.vim @@ -0,0 +1,44 @@ +" +" 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 + \ (PasteHook) + \ :call Set() 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 o (PasteOpenBelow) +nmap o (PasteHook)o " \O opens a line above in paste mode -nmap O (PasteOpenAbove) +nmap O (PasteHook)O -" \p toggles paste mode +" \p toggles paste mode, or sets a hook if plugin available nnoremap p :set paste! paste? +if &loadplugins + nmap p (PasteHook) +endif " \q formats the current paragraph nnoremap q gqap -- cgit v1.2.3 From ca13d0e19d6f25de0db0ac4b611b7143064debd3 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Wed, 12 Sep 2018 23:47:40 +1200 Subject: Bump VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 47a37b80..751cb688 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -tejr dotfiles v1.68.1 -Sun Sep 9 07:56:21 UTC 2018 +tejr dotfiles v1.69.0 +Wed Sep 12 11:47:40 UTC 2018 -- cgit v1.2.3