Questions tagged [filetype-c]

The tag has no usage guidance.

9 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
254 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
1answer
30 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 ...
1
vote
0answers
30 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
0answers
83 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
0answers
168 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
0answers
21 views

Syntax highlighting in parallel folders

My syntax highlighting does not work for my C-project, if I use folders in parallel. Consider this file tree: project ├── include │  ├── main.h │ ├── file1.h │ └── file2.h └── src ├── main.c ...
0
votes
0answers
33 views

How to highlight if defined with #define in Vim?

I want to highlight if defined with #define in Vim. For example, if I type #define ZERO 0, highlight ZERO with a different color.
0
votes
0answers
22 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 ...
0
votes
0answers
86 views

Neovim - Point builtin LSP client for ccls to a compile_commands.json file

I'm using neovim's builtin lsp client for ccls. It requires a JSON compilation database for parsing the codebase (or something, I dunno). I used to use Bear for generating the compilation database, ...