Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set vim not auto indent in extern "C" { line

Tags:

vim

In our project, there will be

#ifdef __cplusplus
extern "C" {
#endif
    int foobar();  // <-- vim auto indent it

how to set vimrc or c-support let vim not auto indent just for extern "C" beside use Marco to replace the extern "C" {?

like image 579
DraculaW Avatar asked Sep 16 '14 03:09

DraculaW


Video Answer


1 Answers

I found extern "C" { //} works for me. Not sure if this depends on any specific cindent or cino settings.

like image 120
Erik Kruus Avatar answered Oct 20 '22 15:10

Erik Kruus