Forum > Suggestions
IDE Codetools space handling around brackets
Frederic Da Vitoria:
Hello,
Currently the only options are to insert a space (or not) before or after brackets. These options do not distinguish between left and right brackets. This means we can ask the IDE to generate code like "foo(param);" or "foo (param );" or "foo( param) ;" or "foo ( param ) ;" but not "foo (param) ;" or "foo( param );". Am I missing something?
User137:
Do you really need this much spacing? You can also play around with fonts and colors, to make things readable. It is also rare that features are added for 1 person's taste. It is possible, but might stray far from any kind of standard, and generally accepted readable code. Remember that often times you need to show your code to other developers.
Frederic Da Vitoria:
I guess I really like it this way. This may be partially due to my being French, as French typographic rules put spaces before colons, semi-colons, question and exclamation marks and around quotes and braces. Also, Lazarus currently allows "foo ( param ) ;" but I'd like "foo (param) ;" which has less spaces :)
Anyhow, I really don't understand the current space-bracket options. Why allow "foo (param );" or "foo( param) ," (the spaces in the last example are "triggered by the brackets, not the comma). I'd understand a merged option to put spaces around all braces, but left or right without discremating between opening and closing braces seems difficult to use.
Zoran:
Although personally I am not interested in using spacing with brackets, I must say that Frederic is right — using left only or right only space with brackets is ridiculous.
There should be separate options for space with left bracket, and for space with right bracket. Frederic, please file bug report.
Frederic Da Vitoria:
Done here: http://mantis.freepascal.org/view.php?id=24667
Navigation
[0] Message Index
[#] Next page