aboutsummaryrefslogtreecommitdiff
path: root/plugin/paste_insert.vim
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2019-06-20 00:16:36 +1200
committerTom Ryder <tom@sanctum.geek.nz>2019-06-20 00:16:36 +1200
commit6a8fda5f3dd282bddf4c9353fee08c17aaf63396 (patch)
tree184336c84f28314db5916e0e1e267dd087b37943 /plugin/paste_insert.vim
parentFirst version (diff)
parentBump VERSION (diff)
downloadvim-paste-insert-6a8fda5f3dd282bddf4c9353fee08c17aaf63396.tar.gz
vim-paste-insert-6a8fda5f3dd282bddf4c9353fee08c17aaf63396.zip
Merge branch 'release/v0.2.0'v0.2.0
* release/v0.2.0: Add comments to plugin file Add better messages, customisable stop key Apply a little more structure to events
Diffstat (limited to 'plugin/paste_insert.vim')
-rw-r--r--plugin/paste_insert.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/plugin/paste_insert.vim b/plugin/paste_insert.vim
index 2c17f80..a792a50 100644
--- a/plugin/paste_insert.vim
+++ b/plugin/paste_insert.vim
@@ -1,8 +1,21 @@
+"
+" This small plugin provides a simple "one shot paste" method, with a command
+" or mapping to prefix opening an insert, with the 'paste' option
+" automatically set after the insert ends, to avoid the annoyances caused by
+" forgetting to do so.
+"
+" Author: Tom Ryder <tom@sanctum.geek.nz>
+" License: Same as Vim itself
+"
if exists('loaded_paste_insert') || &compatible
finish
endif
let loaded_paste_insert = 1
+
+" Command interface
command! -bar PasteInsert
\ call paste_insert#()
+
+" Normal mode mapping interface
nnoremap <Plug>PasteInsert
\ :<C-U>PasteInsert<CR>