2014-01-29 00:29:23 -05:00
|
|
|
scriptencoding utf-8
|
|
|
|
let s:save_cpo = &cpo
|
|
|
|
set cpo&vim
|
|
|
|
|
|
|
|
|
|
|
|
let s:module = {
|
|
|
|
\ "name" : "Paste"
|
|
|
|
\}
|
2014-01-30 01:31:25 -05:00
|
|
|
|
|
|
|
function! s:module.on_char_pre(cmdline)
|
|
|
|
if a:cmdline.is_input("<Over>(paste)")
|
2014-06-06 12:35:19 -04:00
|
|
|
let register = v:register == "" ? '"' : v:register
|
|
|
|
call a:cmdline.insert(tr(getreg("*"), "\n", "\r"))
|
2014-01-29 00:29:23 -05:00
|
|
|
call a:cmdline.setchar('')
|
|
|
|
endif
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
function! s:make()
|
|
|
|
return deepcopy(s:module)
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
let &cpo = s:save_cpo
|
|
|
|
unlet s:save_cpo
|