Toad World® Forums

Code formatter leading comma with space adding two spaces after comma?

In Toad 5.6 when I choose the code formatter option for leading comma with
space:

, [SomeField]

I’m getting a whole bunch of leading spaces followed by the comma, then
two spaces:

, [

Unfortunately, for me it means I cannot use the code formatter.

I think this was working fine until one day I accidentally changed to one of the
built in formatting styles. Now no matter what I do I cannot seem to get rid of
the 2nd space after the comma.

Darren

Hi Darren,
I can’t reproduce described behavior with deault format styles. I’ve played a bit with formatter settings on new style and only then reproduced it.

Can you please double check you have the issue with default style? You can try to replace it in App Data folder with default one from Programm Folder just to be sure it is really not modified.

In any case you can send me the xml file you are referring to so we can take a look.

thanks,
Alexander Maximov

Hey Darren, can I get a copy of the original email on this issue, especially
what you changed, I want to try it for myself…

Any examples would be good…

Thanks.

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

hfreeman@msn.com

678.414.0090 my cell Primary

Hank.Freeman50 (Skype)
image001.gif

Hey Darren, can I get a copy of the original email on this issue, especially
what you changed, I want to try it for myself…

Any examples would be good…

Thanks.

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

hfreeman@msn.com

678.414.0090 my cell Primary

Hank.Freeman50 (Skype)
image002.jpeg

I just tried resetting all my setting to defaults, then in the Editor –
Formatter dialog choose Formatting Style: Defaults

Then on the custom tab:

Choose Leading with Space for the commas formatting style.

When I format this statement:

SELECT CustomerID, PersonID, StoreID, TerritoryID, AccountNumber, rowguid,
ModifiedDate FROM Sales.Customer

It formats like this:

SELECT CustomerID

, PersonID

, StoreID

, TerritoryID

, AccountNumber

, rowguid

, ModifiedDate

FROM Sales.Customer

With two spaces after the comma instead of just one.

Darren

I just tried resetting all my setting to defaults, then in the Editor –
Formatter dialog choose Formatting Style: Defaults

Then on the custom tab:

Choose Leading with Space for the commas formatting style.

When I format this statement:

SELECT CustomerID, PersonID, StoreID, TerritoryID, AccountNumber, rowguid,
ModifiedDate FROM Sales.Customer

It formats like this:

SELECT CustomerID

, PersonID

, StoreID

, TerritoryID

, AccountNumber

, rowguid

, ModifiedDate

FROM Sales.Customer

With two spaces after the comma instead of just one.

Darren
image002.png

Thanks, now I see.

I can’t say right now why it reacts in this way. But I have a question to
you – how about another two pre-defined format styles:
image002.png

Thanks, now I see.

I can’t say right now why it reacts in this way. But I have a question to
you – how about another two pre-defined format styles:

I should mention, this issue is fixed in 5.7 by the way.

Darren

YEAH !!!

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

hfreeman@msn.com

678.414.0090 my cell Primary

Hank.Freeman50 (Skype)
image001.gif

YEAH !!!

Hank Freeman

Senior Systems, Database/Data Warehouse Architect

hfreeman@msn.com

678.414.0090 my cell Primary

Hank.Freeman50 (Skype)
image002.jpeg