clang format: how to force a new line

Viewed 46

I use clang-format in visual studio

I have a code like this:

matrix << 2, 3, 5, 6, 7, 8;

I want it like this:

matrix << 2, 3, 5,
          6, 7, 8;

If I break a line manually, I don't want clang-format changes it to one-line and the first number should align with the first number of previous line.

But everytime formatting the cpp file, it becomes one-line like the first code.

How to configure .clang-format file to achieve this?

0 Answers
Related