From 8c720f6b9d3217e2a9449ce13aac02406edbbb4e Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 26 Dec 2021 11:03:25 +0100 Subject: vim-patch:partial fa3b72348d88 (#16780) Update runtime files https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2 omit doc/eval.txt (needs 8.2.3864) doc/map.txt (needs 8.2.3619) menu.vim (needs 8.2.0413) --- runtime/pack/dist/opt/matchit/plugin/matchit.vim | 42 ++++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'runtime/pack/dist/opt/matchit/plugin') diff --git a/runtime/pack/dist/opt/matchit/plugin/matchit.vim b/runtime/pack/dist/opt/matchit/plugin/matchit.vim index b62cc3913a..51ba3a7f51 100644 --- a/runtime/pack/dist/opt/matchit/plugin/matchit.vim +++ b/runtime/pack/dist/opt/matchit/plugin/matchit.vim @@ -1,7 +1,7 @@ " matchit.vim: (global plugin) Extended "%" matching " Maintainer: Christian Brabandt -" Version: 1.17 -" Last Change: 2019 Oct 24 +" Version: 1.18 +" Last Change: 2020 Dec 23 " Repository: https://github.com/chrisbra/matchit " Previous URL:http://www.vim.org/script.php?script_id=39 " Previous Maintainer: Benji Fisher PhD @@ -48,18 +48,12 @@ set cpo&vim nnoremap (MatchitNormalForward) :call matchit#Match_wrapper('',1,'n') nnoremap (MatchitNormalBackward) :call matchit#Match_wrapper('',0,'n') -xnoremap (MatchitVisualForward) :call matchit#Match_wrapper('',1,'v')m'gv`` +xnoremap (MatchitVisualForward) :call matchit#Match_wrapper('',1,'v') + \:if col("''") != col("$") \| exe ":normal! m'" \| endifgv`` xnoremap (MatchitVisualBackward) :call matchit#Match_wrapper('',0,'v')m'gv`` onoremap (MatchitOperationForward) :call matchit#Match_wrapper('',1,'o') onoremap (MatchitOperationBackward) :call matchit#Match_wrapper('',0,'o') -nmap % (MatchitNormalForward) -nmap g% (MatchitNormalBackward) -xmap % (MatchitVisualForward) -xmap g% (MatchitVisualBackward) -omap % (MatchitOperationForward) -omap g% (MatchitOperationBackward) - " Analogues of [{ and ]} using matching patterns: nnoremap (MatchitNormalMultiBackward) :call matchit#MultiMatch("bW", "n") nnoremap (MatchitNormalMultiForward) :call matchit#MultiMatch("W", "n") @@ -68,16 +62,28 @@ xnoremap (MatchitVisualMultiForward) :call matchit#Multi onoremap (MatchitOperationMultiBackward) :call matchit#MultiMatch("bW", "o") onoremap (MatchitOperationMultiForward) :call matchit#MultiMatch("W", "o") -nmap [% (MatchitNormalMultiBackward) -nmap ]% (MatchitNormalMultiForward) -xmap [% (MatchitVisualMultiBackward) -xmap ]% (MatchitVisualMultiForward) -omap [% (MatchitOperationMultiBackward) -omap ]% (MatchitOperationMultiForward) - " text object: xmap (MatchitVisualTextObject) (MatchitVisualMultiBackward)o(MatchitVisualMultiForward) -xmap a% (MatchitVisualTextObject) + +if !exists("g:no_plugin_maps") + nmap % (MatchitNormalForward) + nmap g% (MatchitNormalBackward) + xmap % (MatchitVisualForward) + xmap g% (MatchitVisualBackward) + omap % (MatchitOperationForward) + omap g% (MatchitOperationBackward) + + " Analogues of [{ and ]} using matching patterns: + nmap [% (MatchitNormalMultiBackward) + nmap ]% (MatchitNormalMultiForward) + xmap [% (MatchitVisualMultiBackward) + xmap ]% (MatchitVisualMultiForward) + omap [% (MatchitOperationMultiBackward) + omap ]% (MatchitOperationMultiForward) + + " Text object + xmap a% (MatchitVisualTextObject) +endif " Call this function to turn on debugging information. Every time the main " script is run, buffer variables will be saved. These can be used directly -- cgit