Skip to content
This repository has been archived by the owner on Oct 1, 2019. It is now read-only.

Commit

Permalink
feat(vim): add Paste fn
Browse files Browse the repository at this point in the history
  • Loading branch information
Delapouite committed Feb 1, 2017
1 parent 13ccfb8 commit f42dcee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions link/.vim/functions.vim
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,11 @@ endfun
function! NPMRegistry ()
silent exec '!xdg-open https://www.npmjs.com/package/' . NPMGetPackage()
endfun

" linewise - characterwise converter
function! Paste(regname, pasteType, pastecmd)
let reg_type = getregtype(a:regname)
call setreg(a:regname, getreg(a:regname), a:pasteType)
exe 'normal "'.a:regname . a:pastecmd
call setreg(a:regname, getreg(a:regname), reg_type)
endfunction

0 comments on commit f42dcee

Please sign in to comment.