mirror of
https://github.com/vim/vim
synced 2025-03-15 14:27:53 +01:00
Problem: matchparen plugin wrong highlights shell case statement (Swudu Susuwu) Solution: return early, if we are in a shSnglCase syntax element The shell syntax element "case $var in foobar)" uses closing parenthesis but there is no corresponding opening parenthesis for that syntax element. However matchparen is not aware of such things and will happily try to match just the next opening parenthesis. So let's just add a way to opt out for such cases. In this case, use the syntax state to check if the closing parenthesis belongs to the syntax item "shSnglCase" and if it is, do not try to find a corresponding opening parenthesis. Since inspecting the syntax state might be expensive, put the whole check behind a filetype test, so that matchparen will only perform this particular check, when it knows the current buffer is a "sh" filetype. fixes: #16801 closes: #16831 Signed-off-by: Christian Brabandt <cb@256bit.org> |
||
---|---|---|
.. | ||
getscriptPlugin.vim | ||
gzip.vim | ||
logiPat.vim | ||
manpager.vim | ||
matchparen.vim | ||
netrwPlugin.vim | ||
openPlugin.vim | ||
README.txt | ||
rrhelper.vim | ||
spellfile.vim | ||
tarPlugin.vim | ||
tohtml.vim | ||
tutor.vim | ||
vimballPlugin.vim | ||
zipPlugin.vim |
The plugin directory is for standard Vim plugin scripts. All files here ending in .vim will be sourced by Vim when it starts up. Look in the file for hints on how it can be disabled without deleting it. getscriptPlugin.vim get latest version of Vim scripts gzip.vim edit compressed files logiPat.vim logical operators on patterns manpager.vim using Vim as manpager matchparen.vim highlight paren matching the one under the cursor netrwPlugin.vim edit files over a network and browse (remote) directories rrhelper.vim used for --remote-wait editing spellfile.vim download a spellfile when it's missing tarPlugin.vim edit (compressed) tar files tohtml.vim convert a file with syntax highlighting to HTML vimballPlugin.vim create and unpack .vba files zipPlugin.vim edit zip archives Note: the explorer.vim plugin is no longer here, the netrw.vim plugin has taken over browsing directories (also for remote directories).