me--
me--

Reputation: 2148

Line length for C code in Visual Studio Code

When formatting C code in VS Code, it seems to insist on wrapping at 80 characters. I figured there would be a setting to control this, but I can't for the life of me find one.

Does anyone know how to set the column width for wrapping C code in VS Code?

Upvotes: 11

Views: 11291

Answers (1)

tbejos
tbejos

Reputation: 514

If you are using the C/C++ extension then add the following to your settings.json

"C_Cpp.clang_format_fallbackStyle": "{ ColumnLimit: 0 }",

This will make it so that when formatting the file it will not automatically wrap lines.

Upvotes: 28

Related Questions