# HG changeset patch # User Christian Brabandt # Date 1486668605 -3600 # Node ID 9130644aec5c226c516b5666e4b96116bf293580 # Parent 7fd418047297bf2bf9fff7e5c0216be3bd84a0d1 patch 8.0.0321: errors when trying to use scripts in tiny version commit https://github.com/vim/vim/commit/8cc2a9c062fa38e133a62778518f769a423a2526 Author: Bram Moolenaar Date: Thu Feb 9 20:22:30 2017 +0100 patch 8.0.0321: errors when trying to use scripts in tiny version Problem: When using the tiny version trying to load the matchit plugin gives an error. On MS-Windows some default mappings fail. Solution: Add a check if the command used is available. (Christian Brabandt) diff --git a/runtime/macros/matchit.vim b/runtime/macros/matchit.vim --- a/runtime/macros/matchit.vim +++ b/runtime/macros/matchit.vim @@ -1,3 +1,5 @@ " Load the matchit package. " For those users who were loading the matchit plugin from here. -packadd matchit +if 1 + packadd matchit +endif diff --git a/runtime/mswin.vim b/runtime/mswin.vim --- 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