xaizek / dotvim (License: Unspecified) (since 2018-12-07)
Vim configuration and plugins.
Commit 6d4ac6b6201f6a81f1d1677a89c17352c86c629a

Fix b:filetype_in_cpp_family error in recent Vim
https://github.com/vim/vim/pull/13650 made this error appear on opening
of C++ sources:

E108: No such variable: "b:filetype_in_cpp_family"
Author: xaizek
Author date (UTC): 2024-01-12 13:27
Committer name: xaizek
Committer date (UTC): 2024-01-12 13:27
Parent(s): 2fd60b20613d6827dc1cd1d4a1d09a1513ea053c
Signing key: 99DC5E4DB05F6BE2
Tree: 886a8941a90e4df3e75f4c3a3535955c233c83d7
File Lines added Lines deleted
pack/other/start/ifdef/after/syntax/c.vim 16 1
File pack/other/start/ifdef/after/syntax/c.vim changed (mode: 100644) (index 8655636..a709643)
1 if &syntax !~ '\.ifdef'
1 " /usr/share/vim/vim91/syntax/cpp.vim contains:
2 "
3 " " inform C syntax that the file was included from cpp.vim
4 " let b:filetype_in_cpp_family = 1
5 "
6 " " Read the C syntax to start with
7 " runtime! syntax/c.vim
8 " unlet b:current_syntax
9 " unlet b:filetype_in_cpp_family
10 "
11 " Updating `set syntax` in this case isn't necessary and is harmful as some
12 " kind of recursion seems to kick in resulting in:
13 "
14 " E108: No such variable: "b:filetype_in_cpp_family"
15
16 if !exists('b:filetype_in_cpp_family') && &syntax !~ '\.ifdef'
2 17 set syntax+=.ifdef set syntax+=.ifdef
3 18 endif endif
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/dotvim

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/dotvim

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master