I noticed that the Format Document command within Visual Studio (Express 2015) does not correctly format the following statement, even though I have Insert spaces before and after binary operators set:

Input (and output):

int a, b, c; a = b*c;

Expected Formatting:

int a, b, c; a = b * c;

If I instead try to format a statement with a numeric component, I get the expected formatting.

Input:

int a, b; a = b*8;

Output:

int a, b; a = b * 8;

Other operators work correctly, such as - , + , and / . I also noticed that % behaves like * . Why does this happen, and how can I get the behavior I want?