3 ms·
On the other hand it is quite handy as a prefix, s_ for structs, e_ for enums, g_ for globals, t_ for simple typedefs, f_ for function pointers typedefs, u_ for
by cassepipe 4y ago
On the other hand it is quite handy as a prefix, s_ for structs, e_ for enums, g_ for globals, t_ for simple typedefs, f_ for function pointers typedefs, u_ for unions... sky is the limit !
And it's quite easy to create an highlighting rule for it in vim if you still did not convert to treesitter. Just put in ~/.vim/after/c.vim :
```
syn match cType /\<\(t\|s\|e\|u\)_\w\+\>/
```
Boom, custom type highlighting for C ! Pick the the letters you will use.
- lifthrasiir 4y agoNo wonder why a significant portion of C programmers actually want to keep tags (`struct` in `struct foo`) instead of removing them wih typedef.