robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Christian Clasonfix(runtime): clean up one-off scripts82b02ae2f2

master
723 B26 linesraw
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()
14  let ove = &ve
15  set ve=all
16  normal! `^
17  if @+ != ''
18    normal! "+gP
19  endif
20  let c = col(".")
21  normal! i
22  if col(".") < c	" compensate for i<ESC> moving the cursor left
23    normal! l
24  endif
25  let &ve = ove
26endfunc