diff --git a/runtime/mswin.vim b/runtime/mswin.vim index ca280d227c..6dff7e7719 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 -" Last change: 2012 Jul 25 +" Last change: 2017 Feb 09 " bail out if this isn't wanted (mrsvim.vim uses this). if exists("g:skip_loading_mswin") && g:skip_loading_mswin @@ -23,20 +23,22 @@ set backspace=indent,eol,start whichwrap+=<,>,[,] " backspace in Visual mode deletes selection vnoremap d -" CTRL-X and SHIFT-Del are Cut -vnoremap "+x -vnoremap "+x +if has("clipboard") + " CTRL-X and SHIFT-Del are Cut + vnoremap "+x + vnoremap "+x -" CTRL-C and CTRL-Insert are Copy -vnoremap "+y -vnoremap "+y + " CTRL-C and CTRL-Insert are Copy + vnoremap "+y + vnoremap "+y -" CTRL-V and SHIFT-Insert are Paste -map "+gP -map "+gP + " CTRL-V and SHIFT-Insert are Paste + map "+gP + map "+gP -cmap + -cmap + + cmap + + cmap + +endif " Pasting blockwise and linewise selections is not possible in Insert and " Visual mode without the +virtualedit feature. They are pasted as if they @@ -44,8 +46,10 @@ cmap + " Uses the paste.vim autoload script. " Use CTRL-G u to have CTRL-Z only undo the paste. -exe 'inoremap