diff options
author | zeertzjq <zeertzjq@outlook.com> | 2023-02-21 23:50:29 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 23:50:29 +0800 |
commit | ee26b227e15abc263195d4c746d5dba9f0e6dec4 (patch) | |
tree | 270e62c0fecf3f75f13fde49658daf1af181b492 /runtime/ftplugin/vim.vim | |
parent | d18f8d5c2d82b209093b2feaa8921a4792b71d59 (diff) | |
download | rneovim-ee26b227e15abc263195d4c746d5dba9f0e6dec4.tar.gz rneovim-ee26b227e15abc263195d4c746d5dba9f0e6dec4.tar.bz2 rneovim-ee26b227e15abc263195d4c746d5dba9f0e6dec4.zip |
vim-patch:partial:938ae280c79b (#22356)
Update runtime files.
https://github.com/vim/vim/commit/938ae280c79b8cdb0fca60336ec4c090ecd8bb5a
Partially skip autocmd.txt: needs patch 8.2.5011.
Partially skip builtin.txt: needs patch 9.0.0411.
Partially skip eval.txt: needs patch 8.2.3783.
Cherry-pick :map-meta-keys from patch 9.0.1276.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
Diffstat (limited to 'runtime/ftplugin/vim.vim')
-rw-r--r-- | runtime/ftplugin/vim.vim | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/runtime/ftplugin/vim.vim b/runtime/ftplugin/vim.vim index b64bb55d68..a2cbc28971 100644 --- a/runtime/ftplugin/vim.vim +++ b/runtime/ftplugin/vim.vim @@ -1,7 +1,7 @@ " Vim filetype plugin " Language: Vim " Maintainer: Bram Moolenaar <Bram@vim.org> -" Last Change: 2022 Nov 27 +" Last Change: 2023 Feb 07 " Only do this when not done yet for this buffer if exists("b:did_ftplugin") @@ -98,18 +98,23 @@ if exists("loaded_matchit") " func name " require a parenthesis following, then there can be an "endfunc". let b:match_words = - \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' . - \ '\<\(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\(w\%[hile]\|fo\%[r]\)\>,' . - \ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' . - \ '{:},' . - \ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' . - \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' + \ '\<\%(fu\%[nction]\|def\)!\=\s\+\S\+\s*(:\%(\%(^\||\)\s*\)\@<=\<retu\%[rn]\>:\%(\%(^\||\)\s*\)\@<=\<\%(endf\%[unction]\|enddef\)\>,' .. + \ '\<\%(wh\%[ile]\|for\)\>:\%(\%(^\||\)\s*\)\@<=\<brea\%[k]\>:\%(\%(^\||\)\s*\)\@<=\<con\%[tinue]\>:\%(\%(^\||\)\s*\)\@<=\<end\%(w\%[hile]\|fo\%[r]\)\>,' .. + \ '\<if\>:\%(\%(^\||\)\s*\)\@<=\<el\%[seif]\>:\%(\%(^\||\)\s*\)\@<=\<en\%[dif]\>,' .. + \ '{:},' .. + \ '\<try\>:\%(\%(^\||\)\s*\)\@<=\<cat\%[ch]\>:\%(\%(^\||\)\s*\)\@<=\<fina\%[lly]\>:\%(\%(^\||\)\s*\)\@<=\<endt\%[ry]\>,' .. + \ '\<aug\%[roup]\s\+\%(END\>\)\@!\S:\<aug\%[roup]\s\+END\>,' .. + \ '\<class\>:\<endclass\>,' .. + \ '\<inte\%[rface]\>:\<endinterface\>,' .. + \ '\<enu\%[m]\>:\<endenum\>,' + " Ignore syntax region commands and settings, any 'en*' would clobber " if-endif. " - set spl=de,en " - au! FileType javascript syntax region foldBraces start=/{/ end=/}/ … - let b:match_skip = 'synIDattr(synID(line("."),col("."),1),"name") - \ =~? "comment\\|string\\|vimLetHereDoc\\|vimSynReg\\|vimSet"' + " Also ignore here-doc and dictionary keys (vimVar). + let b:match_skip = 'synIDattr(synID(line("."), col("."), 1), "name") + \ =~? "comment\\|string\\|vimSynReg\\|vimSet\\|vimLetHereDoc\\|vimVar"' endif let &cpo = s:cpo_save |