aboutsummaryrefslogtreecommitdiff
path: root/plugin/paste_insert.vim
blob: a792a50a03918a58b1d7c99b8093e08bc428383e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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>