Re: [vim/vim] runtime(sh): Selectively suppress matching syntax errors (PR #20935)
Aliaksei Budavei (Vim Github Repository) <[email protected]>
| Newsgroups | gmane.editors.vim.devel |
|---|---|
| Message-ID | <vim/vim/pull/20935/[email protected]> |
zzzyxwvut left a comment (vim/vim#20935)
The syntax plugins for `sh` (the target plugin of this patch)
and `csh` (see [`syntax/csh.vim`](https://github.com/vim/vim/blob/master/runtime/syntax/csh.vim)) do not depend on one another;
there is no common configuration between them.
If filetype detection is enabled (`:filetype plugin on`), you
may consider `after/ftplugin/sh.vim` (which is sourced before
`syntax/sh.vim` and `after/syntax/sh.vim`) for tailoring
`g:sh_no_error_rules` to already known files where certain
"syntax errors" are misclaimed. For example,
```vim
if fnamemodify(bufname(), ':t') ==# 'sh_functions_bash.sh'
" Do not define shDerefWordError.
let g:sh_no_error_rules = ['shDerefWordError']
else
" Define and try every sh*Error candidate otherwise.
unlet! g:sh_no_error_rules g:sh_no_error
endif
```
--
Reply to this email directly or view it on GitHub:
https://github.com/vim/vim/pull/20935#issuecomment-5304378085
You are receiving this because you are subscribed to this thread.
Message ID: <vim/vim/pull/20935/[email protected]>
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups "vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/d/msgid/vim_dev/vim/vim/pull/20935/c5304378085%40github.com.