comparison runtime/pack/dist/opt/matchit/plugin/matchit.vim @ 26708:f0d7cb510ce3

Update runtime files Commit: https://github.com/vim/vim/commit/fa3b72348d88343390fbe212cfc230fec1602fc2 Author: Bram Moolenaar <Bram@vim.org> Date: Fri Dec 24 13:18:38 2021 +0000 Update runtime files
author Bram Moolenaar <Bram@vim.org>
date Fri, 24 Dec 2021 14:30:04 +0100
parents d4deb2e50667
children ea044451c98f
comparison
equal deleted inserted replaced
26707:d1af15dbf206 26708:f0d7cb510ce3
1 " matchit.vim: (global plugin) Extended "%" matching 1 " matchit.vim: (global plugin) Extended "%" matching
2 " Maintainer: Christian Brabandt 2 " Maintainer: Christian Brabandt
3 " Version: 1.17 3 " Version: 1.18
4 " Last Change: 2019 Oct 24 4 " Last Change: 2020 Dec 23
5 " Repository: https://github.com/chrisbra/matchit 5 " Repository: https://github.com/chrisbra/matchit
6 " Previous URL:http://www.vim.org/script.php?script_id=39 6 " Previous URL:http://www.vim.org/script.php?script_id=39
7 " Previous Maintainer: Benji Fisher PhD <benji@member.AMS.org> 7 " Previous Maintainer: Benji Fisher PhD <benji@member.AMS.org>
8 8
9 " Documentation: 9 " Documentation:
46 let s:save_cpo = &cpo 46 let s:save_cpo = &cpo
47 set cpo&vim 47 set cpo&vim
48 48
49 nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR> 49 nnoremap <silent> <Plug>(MatchitNormalForward) :<C-U>call matchit#Match_wrapper('',1,'n')<CR>
50 nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR> 50 nnoremap <silent> <Plug>(MatchitNormalBackward) :<C-U>call matchit#Match_wrapper('',0,'n')<CR>
51 xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>m'gv`` 51 xnoremap <silent> <Plug>(MatchitVisualForward) :<C-U>call matchit#Match_wrapper('',1,'v')<CR>
52 \:if col("''") != col("$") \| exe ":normal! m'" \| endif<cr>gv``
52 xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv`` 53 xnoremap <silent> <Plug>(MatchitVisualBackward) :<C-U>call matchit#Match_wrapper('',0,'v')<CR>m'gv``
53 onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR> 54 onoremap <silent> <Plug>(MatchitOperationForward) :<C-U>call matchit#Match_wrapper('',1,'o')<CR>
54 onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR> 55 onoremap <silent> <Plug>(MatchitOperationBackward) :<C-U>call matchit#Match_wrapper('',0,'o')<CR>
55
56 nmap <silent> % <Plug>(MatchitNormalForward)
57 nmap <silent> g% <Plug>(MatchitNormalBackward)
58 xmap <silent> % <Plug>(MatchitVisualForward)
59 xmap <silent> g% <Plug>(MatchitVisualBackward)
60 omap <silent> % <Plug>(MatchitOperationForward)
61 omap <silent> g% <Plug>(MatchitOperationBackward)
62 56
63 " Analogues of [{ and ]} using matching patterns: 57 " Analogues of [{ and ]} using matching patterns:
64 nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR> 58 nnoremap <silent> <Plug>(MatchitNormalMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>
65 nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR> 59 nnoremap <silent> <Plug>(MatchitNormalMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>
66 xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv`` 60 xnoremap <silent> <Plug>(MatchitVisualMultiBackward) :<C-U>call matchit#MultiMatch("bW", "n")<CR>m'gv``
67 xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv`` 61 xnoremap <silent> <Plug>(MatchitVisualMultiForward) :<C-U>call matchit#MultiMatch("W", "n")<CR>m'gv``
68 onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR> 62 onoremap <silent> <Plug>(MatchitOperationMultiBackward) :<C-U>call matchit#MultiMatch("bW", "o")<CR>
69 onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR> 63 onoremap <silent> <Plug>(MatchitOperationMultiForward) :<C-U>call matchit#MultiMatch("W", "o")<CR>
70 64
71 nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
72 nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
73 xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
74 xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
75 omap <silent> [% <Plug>(MatchitOperationMultiBackward)
76 omap <silent> ]% <Plug>(MatchitOperationMultiForward)
77
78 " text object: 65 " text object:
79 xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward) 66 xmap <silent> <Plug>(MatchitVisualTextObject) <Plug>(MatchitVisualMultiBackward)o<Plug>(MatchitVisualMultiForward)
80 xmap a% <Plug>(MatchitVisualTextObject) 67
68 if !exists("g:no_plugin_maps")
69 nmap <silent> % <Plug>(MatchitNormalForward)
70 nmap <silent> g% <Plug>(MatchitNormalBackward)
71 xmap <silent> % <Plug>(MatchitVisualForward)
72 xmap <silent> g% <Plug>(MatchitVisualBackward)
73 omap <silent> % <Plug>(MatchitOperationForward)
74 omap <silent> g% <Plug>(MatchitOperationBackward)
75
76 " Analogues of [{ and ]} using matching patterns:
77 nmap <silent> [% <Plug>(MatchitNormalMultiBackward)
78 nmap <silent> ]% <Plug>(MatchitNormalMultiForward)
79 xmap <silent> [% <Plug>(MatchitVisualMultiBackward)
80 xmap <silent> ]% <Plug>(MatchitVisualMultiForward)
81 omap <silent> [% <Plug>(MatchitOperationMultiBackward)
82 omap <silent> ]% <Plug>(MatchitOperationMultiForward)
83
84 " Text object
85 xmap a% <Plug>(MatchitVisualTextObject)
86 endif
81 87
82 " Call this function to turn on debugging information. Every time the main 88 " Call this function to turn on debugging information. Every time the main
83 " script is run, buffer variables will be saved. These can be used directly 89 " script is run, buffer variables will be saved. These can be used directly
84 " or viewed using the menu items below. 90 " or viewed using the menu items below.
85 if !exists(":MatchDebug") 91 if !exists(":MatchDebug")