comparison runtime/mswin.vim @ 654:441f938ea9e9 v7.0192

updated for version 7.0192
author vimboss
date Sat, 04 Feb 2006 00:59:56 +0000
parents 9e359e5759f6
children e180933b876a
comparison
equal deleted inserted replaced
653:5acda076fb0c 654:441f938ea9e9
1 " Set options and add mapping such that Vim behaves a lot like MS-Windows 1 " Set options and add mapping such that Vim behaves a lot like MS-Windows
2 " 2 "
3 " Maintainer: Bram Moolenaar <Bram@vim.org> 3 " Maintainer: Bram Moolenaar <Bram@vim.org>
4 " Last change: 2005 Dec 28 4 " Last change: 2006 Feb 02
5 5
6 " bail out if this isn't wanted (mrsvim.vim uses this). 6 " bail out if this isn't wanted (mrsvim.vim uses this).
7 if exists("g:skip_loading_mswin") && g:skip_loading_mswin 7 if exists("g:skip_loading_mswin") && g:skip_loading_mswin
8 finish 8 finish
9 endif 9 endif
45 if has("virtualedit") 45 if has("virtualedit")
46 nnoremap <silent> <SID>Paste :call <SID>Paste()<CR> 46 nnoremap <silent> <SID>Paste :call <SID>Paste()<CR>
47 func! <SID>Paste() 47 func! <SID>Paste()
48 let ove = &ve 48 let ove = &ve
49 set ve=all 49 set ve=all
50 normal `^ 50 normal! `^
51 if @+ != '' 51 if @+ != ''
52 normal "+gP 52 normal! "+gP
53 endif 53 endif
54 let c = col(".") 54 let c = col(".")
55 normal i 55 normal! i
56 if col(".") < c " compensate for i<ESC> moving the cursor left 56 if col(".") < c " compensate for i<ESC> moving the cursor left
57 " Avoid a beep when the text ends at the window edge. 57 " Avoid a beep when the text ends at the window edge.
58 let vb_save = &vb 58 let vb_save = &vb
59 let t_vb_save = &t_vb 59 let t_vb_save = &t_vb
60 set vb t_vb= 60 set vb t_vb=
61 normal l 61 normal! l
62 let &vb = vb_save 62 let &vb = vb_save
63 let &t_vb = t_vb_save 63 let &t_vb = t_vb_save
64 endif 64 endif
65 let &ve = ove 65 let &ve = ove
66 endfunc 66 endfunc