1" Vim support file to help with paste mappings and menus 2" Maintainer: Bram Moolenaar <[email protected]> 3" Last Change: 2019 Jan 27 4 5" Define the string to use for items that are present both in Edit, Popup and 6" Toolbar menu. Also used in mswin.vim and macmap.vim. 7 8let paste#paste_cmd = {'n': ":call paste#Paste()<CR>"} 9let paste#paste_cmd['v'] = '"-c<Esc>' . paste#paste_cmd['n'] 10let paste#paste_cmd['i'] = "\<c-\>\<c-o>\"+gP" 11 12func! paste#Paste() 13 let ove = &ve 14 set ve=all 15 normal! `^ 16 if @+ != '' 17 normal! "+gP 18 endif 19 let c = col(".") 20 normal! i 21 if col(".") < c " compensate for i<ESC> moving the cursor left 22 normal! l 23 endif 24 let &ve = ove 25endfunc 26