Register
4coder»Forums»Virtual whitespace creates too much whitespace in function calls
John
1 posts
Virtual whitespace creates too much whitespace in function calls
1 month ago Edited by John on Aug. 14, 2020, 10:47 a.m.
I want:
1
2
3
4
5
hello_how_are_you(
    x,
    y,
    z
);

but I get:
1
2
3
4
5
hello_how_are_you(
                  x,
                  y,
                  z
                  );


Would be nice if you added an option for that in config.4coder. :-)

Also with virtual whitespace disabled there is no way to indent multiple lines, or even a single line, you have to spam spacebar/backspace which is annoying. It's impossible to please everybody with auto formatting so unless the editor is good enough with auto formatting/virtual whitespace disabled, only those who like how it exactly is will use 4coder.

I tried to change the indentation behaviour and add a tab command using the customization layer myself, but I failed because I didn't understand the code. [Edit]: I have now managed to create working "tab commands". :-)

TY.
Simon Anciaux
881 posts
Virtual whitespace creates too much whitespace in function calls
1 month ago
There is a layout hook (in 4coder_default_hooks.cpp) that should allow you to customize indentation (I think, I've never used it). The layout code is in 4coder_layout_rule.cpp and 4coder_layout_rule.h. But I just tried to use it and it seems that it doesn't work as the layout hook seems to only be called on application startup and never after. I'll report that on github.