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