Questions tagged [filetype-c]
Questions about the c file type.
8
questions with no upvoted or accepted answers
3
votes
1
answer
2k
views
Vim to highlight functions and user-defined types
I have two scenarios where I want vim to highlight those items. Currently my fix for these are to add the return types directly into the after/syntax/c.vim file, but this gets incredibly tedious. Here ...
2
votes
0
answers
321
views
Tools for working with C #ifdef preprocessor directives?
I want to work with a C code with a lot of #ifdef directives. I wonder if there is a program, that will show me, which of these #ifdef's will be left in the code, and which will be cut out by ...
1
vote
0
answers
62
views
Syntax highlighting for two components of C syntax
What are the following two components that I need to target with syntax highlighting/rules?
The first one is the int (or more generall, any storage class) that I want to colorize. If currently have ...
1
vote
0
answers
292
views
Setting up C code highlighting
I've used vim for mostly python or web-related projects. Now I'm trying to see if I can use it to write some C code. The first thing that I've noticed is whatever setup I have, doesn't have any C code ...
1
vote
0
answers
173
views
automatic popup in vim with clang_complete plugin
I want to use Vim to program in clang (*.c and *.cpp).
At the moment I am trying to use the clang-complete plugin and I like the autocompletion but I have to use the <C-n> or <C-p> ...
1
vote
1
answer
356
views
Using NerdCommenter to comment/uncomment blocks with old-style C comments
I'm using the NerdCommenters leader c<space> to toggle comments on blocks of C code, but when those blocks already contain C comments, they get replaced, by default with [> and <], and ...
1
vote
0
answers
222
views
Why does cindent align statements to closing } in switch case?
I prefer this indentation style for switch cases with local variables:
switch (expr) {
case CONST_BLAH1: {
int decl; // scope local to this case
stmt;
break;
case CONST_BLAH2: ...
0
votes
0
answers
30
views
Indenting C with brace macros
I use a bunch of weird C macros which basically should behave like braces as far as formatting is concerned. My equalprg is empty, so I'm using vim's indenting function for = formatting. Is there any ...