New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for #elifdef and #elifndef to c.vim #13667
Add support for #elifdef and #elifndef to c.vim #13667
Comments
can you create a PR to |
C2x and C++23 add these new preprocessor conditionals, as shorter forms of #elif defined and #elif !defined. Fixes vim#13667
Done, but see my comment on #13679 about whether the PR is complete or not. |
The matchit plugin also needs to recognize vim/runtime/pack/dist/opt/matchit/autoload/matchit.vim Lines 91 to 92 in 71d0ba0
The built-in |
I'll add it to #12984, thanks. |
Conditionally highlight C23 features: - #embed, #elifdef and #elifndef preprocessor directives - predefined macros - UTF-8 character constants - binary integer constants, _BitInt literals, and digit separators - nullptr_t type and associated constant - decimal real floating-point, bit precise and char types - typeof operators Matchit: - update for new preprocessor directives Fixes vim#13667.
Marvellous, thank you! |
The new C2x and C++23 standards add new preprocessing conditionals,
#elifdef
and#elifndef
For C the proposal was:
https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2645.pdf
For C++ the proposal was:
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p2334r1.pdf
They've been supported by GCC for a couple of years:
https://gcc.gnu.org/gcc-12/changes.html#c
Vim does not recognize these and so doesn't syntax highlight them.
The text was updated successfully, but these errors were encountered: