summaryrefslogtreecommitdiff
path: root/runtime/mswin.vim
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2006-03-09 22:37:52 +0000
committerBram Moolenaar <Bram@vim.org>2006-03-09 22:37:52 +0000
commit1056d988442648527a45366c9d16523cdc521031 (patch)
treeafd2b3182b3c81edf3f95a34c10b3a3ea2e5c833 /runtime/mswin.vim
parent4ea8fe1d0600a7020c9f3a652f1d429a96965311 (diff)
downloadvim-git-1056d988442648527a45366c9d16523cdc521031.tar.gz
updated for version 7.0219v7.0219
Diffstat (limited to 'runtime/mswin.vim')
-rw-r--r--runtime/mswin.vim37
1 files changed, 6 insertions, 31 deletions
diff --git a/runtime/mswin.vim b/runtime/mswin.vim
index 75c249fb8..ebc27f00e 100644
--- a/runtime/mswin.vim
+++ b/runtime/mswin.vim
@@ -1,7 +1,7 @@
" Set options and add mapping such that Vim behaves a lot like MS-Windows
"
" Maintainer: Bram Moolenaar <Bram@vim.org>
-" Last change: 2006 Feb 02
+" Last change: 2006 Mar 09
" bail out if this isn't wanted (mrsvim.vim uses this).
if exists("g:skip_loading_mswin") && g:skip_loading_mswin
@@ -41,36 +41,11 @@ cmap <S-Insert> <C-R>+
" Pasting blockwise and linewise selections is not possible in Insert and
" Visual mode without the +virtualedit feature. They are pasted as if they
" were characterwise instead.
-" Note: the same stuff appears in menu.vim.
-if has("virtualedit")
- nnoremap <silent> <SID>Paste :call <SID>Paste()<CR>
- func! <SID>Paste()
- let ove = &ve
- set ve=all
- normal! `^
- if @+ != ''
- normal! "+gP
- endif
- let c = col(".")
- normal! i
- if col(".") < c " compensate for i<ESC> moving the cursor left
- " Avoid a beep when the text ends at the window edge.
- let vb_save = &vb
- let t_vb_save = &t_vb
- set vb t_vb=
- normal! l
- let &vb = vb_save
- let &t_vb = t_vb_save
- endif
- let &ve = ove
- endfunc
- inoremap <script> <C-V> x<BS><Esc><SID>Pastegi
- vnoremap <script> <C-V> "-c<Esc><SID>Paste
-else
- nnoremap <silent> <SID>Paste "=@+.'xy'<CR>gPFx"_2x
- inoremap <script> <C-V> x<Esc><SID>Paste"_s
- vnoremap <script> <C-V> "-c<Esc>gix<Esc><SID>Paste"_x
-endif
+" Uses the paste.vim autoload script.
+
+exe 'inoremap <script> <C-V>' paste#paste_cmd['i']
+exe 'vnoremap <script> <C-V>' paste#paste_cmd['v']
+
imap <S-Insert> <C-V>
vmap <S-Insert> <C-V>