There's no option for this at the moment. I believe what you'd really
want, however, is an option to automatically align variable
initializers similar to how certain comments get aligned.

> On Jun 14, 2014, at 3:59 PM, "Michael Wünsch" <liganic-cl...@gmx.org> wrote:
>
> Hey everyone,
> I'm trying to get clang-format to preserve horizontal whitespace. For
> example:
>
> void main() {
>  int FOO       = 1;
>  int BAR       = 2;
>  int VERY_LONG = 3;
> }
>
> gets mushed into (using -style=Google as an example):
> void main() {
>  int FOO = 1;
>  int BAR = 2;
>  int VERY_LONG = 3;
> }
>
> The (Google) Styleguide
> (https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml) says:
>
> "// Assignment operators always have spaces around them."
>
> This means at least one, not exactly one. clang-format however always
> consumes all horizontal whitespace and merges it into one space.
>
> Is there any way to fix this?
>
> Regards,
> --
> Michael
> _______________________________________________
> cfe-users mailing list
> cfe-users@cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users

_______________________________________________
cfe-users mailing list
cfe-users@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users

Reply via email to