From 5342342426777160300a431ef8c9200fb151f793 Mon Sep 17 00:00:00 2001 From: "Justin M. Keyes" Date: Thu, 1 Aug 2019 15:29:47 +0200 Subject: runtime: move matchit.vim to /pack/dist/opt/ Align matchit.vim with upstream Vim. We don't want to maintain a fork of matchit.vim; our small changes should be sent to https://github.com/chrisbra/matchit --- runtime/plugin/matchit.vim | 94 +--------------------------------------------- 1 file changed, 2 insertions(+), 92 deletions(-) (limited to 'runtime/plugin') diff --git a/runtime/plugin/matchit.vim b/runtime/plugin/matchit.vim index 84147f1fc8..ef698631b9 100644 --- a/runtime/plugin/matchit.vim +++ b/runtime/plugin/matchit.vim @@ -1,92 +1,2 @@ -" matchit.vim: (global plugin) Extended "%" matching -" Maintainer: Christian Brabandt -" Version: 1.15 -" Last Change: 2019 Jan 28 -" Repository: https://github.com/chrisbra/matchit -" Previous URL:http://www.vim.org/script.php?script_id=39 -" Previous Maintainer: Benji Fisher PhD - -" Documentation: -" The documentation is in a separate file: ../doc/matchit.txt . - -" Credits: -" Vim editor by Bram Moolenaar (Thanks, Bram!) -" Original script and design by Raul Segura Acevedo -" Support for comments by Douglas Potts -" Support for back references and other improvements by Benji Fisher -" Support for many languages by Johannes Zellner -" Suggestions for improvement, bug reports, and support for additional -" languages by Jordi-Albert Batalla, Neil Bird, Servatius Brandt, Mark -" Collett, Stephen Wall, Dany St-Amant, Yuheng Xie, and Johannes Zellner. - -" Debugging: -" If you'd like to try the built-in debugging commands... -" :MatchDebug to activate debugging for the current buffer -" This saves the values of several key script variables as buffer-local -" variables. See the MatchDebug() function, below, for details. - -" TODO: I should think about multi-line patterns for b:match_words. -" This would require an option: how many lines to scan (default 1). -" This would be useful for Python, maybe also for *ML. -" TODO: Maybe I should add a menu so that people will actually use some of -" the features that I have implemented. -" TODO: Eliminate the MultiMatch function. Add yet another argument to -" Match_wrapper() instead. -" TODO: Allow :let b:match_words = '\(\(foo\)\(bar\)\):\3\2:end\1' -" TODO: Make backrefs safer by using '\V' (very no-magic). -" TODO: Add a level of indirection, so that custom % scripts can use my -" work but extend it. - -" Allow user to prevent loading and prevent duplicate loading. -if exists("g:loaded_matchit") || &cp - finish -endif -let g:loaded_matchit = 1 - -let s:save_cpo = &cpo -set cpo&vim - -nnoremap (MatchitNormalForward) :call matchit#Match_wrapper('',1,'n') -nnoremap (MatchitNormalBackward) :call matchit#Match_wrapper('',0,'n') -vnoremap (MatchitVisualForward) :call matchit#Match_wrapper('',1,'v')m'gv`` -vnoremap (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") -vnoremap (MatchitVisualMultiBackward) :call matchit#MultiMatch("bW", "n")m'gv`` -vnoremap (MatchitVisualMultiForward) :call matchit#MultiMatch("W", "n")m'gv`` -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: -vmap (MatchitVisualTextObject) (MatchitVisualMultiBackward)o(MatchitVisualMultiForward) -xmap a% (MatchitVisualTextObject) - -" 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 -" or viewed using the menu items below. -if !exists(":MatchDebug") - command! -nargs=0 MatchDebug call matchit#Match_debug() -endif - -let &cpo = s:save_cpo -unlet s:save_cpo - -" vim:sts=2:sw=2:et: +" Nvim: load the matchit plugin by default. +packadd matchit -- cgit