Closed bmxng-DerFetteElch closed 4 years ago
This bugs me, too, though I realise it's probably the norm! Also, my own preference would be:
CreateThing (xyz:Int, abc:String)
Note space before bracket and after commas, as in written English. Not the most popular form, but if it were to be made more configurable, that'd be a nice option.
I've added 3 new format options found in Settings > Extensions > BlitzMax. They're already available in version 1.31.0 and will have to do for now.
When making this extension quickly realized that I can't possibly add enough options to suit everyone's coding style.
So the idea was to add a dialog where the user could add something like "Inser Space After..."
and then select like "Function"
or "("
and everything else.
Even things like "Insert New Line After..."
"If Statement"
or "Method"
.
That way everyone could define exactly how they wanted their code formatted.
But this turned out to be a lot harder than expected.
Especially since I have no control of hardcoded things like snippets.
And there are lot of special cases for all of these that sometimes would even break the users code, which is unacceptable.
I'll probably have another go at adding something like that in the future. Maybe dynamically generated snippets are possible?
First of all, thank you very much for your great work on this extension!
But, (there is always a but :D):
In my opinion, the first combination of prefs should fit my request, but it still adds a space before the last bracket. The second combination of prefs does not add the space before the bracket. I think that there is something wrong or buggy.
Best regards.
My bad! Misplaced bracket in the code. :) Should be fixed in 1.31.1.
Thank you again! It is fixed now.
Setup (place X in matching boxes):
Describe the bug This is a request, no bug report!
If it is possible to do: Can we have optional bracket handling in auto-completion?
For me it looks very strange to have a space between the opening bracket and the first parameter, or the last parameter and the closing bracket.
I know, that i can do it by modifying blitzmax.js (lines 386+392), but in my opinion that is not the right way. After all this has to be done each time the extension is updated.
Screenshots Before modifying blitzmax.js:
After modifying blitzmax.js: