Skip to content

How to change the width of line wrap from 120 default? #12280

Answered by manos-msdn
manos-msdn asked this question in Q&A
Discussion options

You must be logged in to vote

Posting here the way I resolved this in case it helps others - add this to the vscode settings:

"C_Cpp.clang_format_style": "{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, ColumnLimit: 140, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, AccessModifierOffset: -4, NamespaceIndentation: All, FixNamespaceComments: false }",

and change the number at ColumnLimit

Also can add editor rulers to help visually

"editor.rulers": [
    140,
    160
  ],

Another way possible if the above does not work:

In vsode settings add this and restart vscode (not sure if you need the first 2 but anyway):

"C_Cpp.clang_format_style": "Visual Studio…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by manos-msdn
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant