Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 228
me-- Avatar asked Aug 01 '19 23:08

me--


Video Answer


1 Answers

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.

like image 58
tbejos Avatar answered Oct 26 '22 02:10

tbejos