Page 2 of 3
Re: Place spaces around operators (?)
Posted: Wed Feb 23, 2022 7:28 pm
by HeX0R
Should be fixed now also.
I've integrated a backup functionality, because while testing some procedures I corrupted my code by accident.
That shouldn't happen with the release version of course, but well... who knows.
By default it will hold 5 backups, no matter which file you indented.
They are in %TEMP%/smartindent/ and the backup_1.pb is always the latest.
How about the English name e.g. TidyPB?
Yeah, will do that the moment you start using english comments in all your codes

Re: Place spaces around operators (?)
Posted: Wed Feb 23, 2022 8:47 pm
by ChrisR
Great, thank you for waking your nice TidyPB up

Re: Place spaces around operators (?)
Posted: Thu Feb 24, 2022 11:52 am
by Caronte3D
Very useful tool

Re: Place spaces around operators (?)
Posted: Thu Feb 24, 2022 12:02 pm
by zikitrake
Thanks a million for this useful tool!
Re: Place spaces around operators (?)
Posted: Thu Mar 10, 2022 12:15 am
by AZJIO
Re: Place spaces around operators (?)
Posted: Thu Mar 10, 2022 8:31 am
by BarryG
AZJIO wrote: Mon Feb 21, 2022 2:46 pmAre there any features to fix this situation?
It's not actually a fault to be "fixed"; it's just a personal coding preference. I myself prefer no spaces around operators.
Re: Place spaces around operators (?)
Posted: Thu Mar 10, 2022 9:21 pm
by HeX0R
AZJIO wrote: Thu Mar 10, 2022 12:15 am
HeX0R
v1.12
In fact it is v1.14 already (might have missed to upload some versions).
That is no valid code!
I've integrated the others.
It's a little tricky to distinguish between pointernames and multiplication signs, therefore the star (*) is not perfectly working.
Re: Place spaces around operators (?)
Posted: Thu Mar 10, 2022 11:23 pm
by AZJIO
The
PureBasic help says that you can get a handle to Scintilla if you run it as a tool
Code: Select all
MessageRequester("", GetEnvironmentVariable("PB_TOOL_Scintilla"))
you can paste the result into the document window.
Re: Place spaces around operators (?)
Posted: Thu Mar 10, 2022 11:29 pm
by HeX0R
I know that, but it's not needed for that tool.
Re: Place spaces around operators (?)
Posted: Fri Mar 11, 2022 10:51 pm
by HeX0R
improved star (*) handling
Re: Place spaces around operators (?)
Posted: Fri Mar 11, 2022 11:40 pm
by AZJIO
I did not quite understand some things in the screenshots, but it did not work for me:
"%TEMPFILE"
I figured it out, I had to check the boxes
You need to take a screenshot in the first post and mark the checkboxes with a red circle.

Re: Place spaces around operators (?)
Posted: Sat Mar 12, 2022 11:43 am
by HeX0R
Usually I'd included
this here, then installation is just one click away.
But here I thought it is simple enough.
@Mods:
It might be worth to move that discussion about that tool into a new one, somewhere in... dunno, Applications Feedback & Discussions?
Re: Place spaces around operators (?)
Posted: Mon Mar 14, 2022 8:24 am
by AZJIO
Code: Select all
Repeat
AddElement(StringList())
p = FindString(S\s, Separator)
StringList() = PeekS(*S\i, p - 1)
*S\i + (p + slen - 1) << #PB_Compiler_Unicode
Until p = 0
There are many spaces before the "=" sign.
Is it possible to make a parameter to disable "=" alignment?
Re: Place spaces around operators (?)
Posted: Mon Mar 14, 2022 9:52 am
by HeX0R
Added -noequalalign command parameter
Re: Place spaces around operators (?)
Posted: Fri Mar 18, 2022 4:46 am
by AZJIO
Code: Select all
ButtonGadget (#btnOpnFile, 480, 40, 30, 30, "...")
ButtonGadget(#btnOpnFile, 480, 40, 30, 30, "...")
space before opening bracket