indent_shift
Whether to indent continued shift expressions ('<<' and '>>') instead of aligning. Set align_left_shift=false when enabling this.
Possible values are true or false, default false.
Examples
true
Config:
indent_shift = true
align_left_shift = false #mandatory if indent_shift == true
Code before:
int main()
{
int X = 25;
std::cout << "X is: " << '\n'
<< " :" << X
<< '\n';
int Y = 25;
std::cout << "Y is: " << '\n'
<< " :" << Y
<< '\n';
return 0;
}
After:
int main()
{
int X = 25;
std::cout << "X is: " << '\n'
<< " :" << X
<< '\n';
int Y = 25;
std::cout << "Y is: " << '\n'
<< " :" << Y
<< '\n';
return 0;
}
Note, the "Y" code was moved to first indent position (one tab).
false
False example works exactly like align_left_shift.
See also
- indent_class: Whether the '
class
' body is indented. - align_left_shift: Whether to align lines that start with '<<' with previous '<<'.