Toad World® Forums

UE formatting incorrectly


#1

The Unified Editor does not format the SQL correctly when I use Ctrl-R. My formatting options should stack all my SELECT fields as follows:
SELECT one,
two,
three
FROM mytable

But with UE, it formats if like:
SELECT one,
two,
three
FROM myTable

If I go back to the old SQL Editor (using ctrl-M), put in the same SQL stmt and press ctrl-R, it will format it correctly. So it is not the setting for my formatting options.

Thanks.
-Charlie


#2

That’s very strange. I thought we do formatting from UE exactly the same way it’s done in old editor. I’ll have to investigate it further.

Roman


#3

Hi Charlie,

We looked at this one at yesterday’s CCB and came up a blank.
We found that the formatting (using <Ctrl + R>) was handled the same between both editors.
The only issue we found, was that the key words were not highlighted as expected (but this is covered in a different thread, raised by you).
The tab spacing and alignment was consistent though.

Can you please give us some more info on this one.

Thanks for your help…
Jaime


#4

Tabs seem to be the problem. I have in my formatting options to use Tabs instead of spaces. (When set to Spaces, it does format correctly.)

As in my initial example in the start of this thread, the second example actually has two tabs in front of the field names. But UE is interpreting the tabs as spaces, and only putting two spacing in the two tabs.

I’ve also discovered that UE will not keep the tab character. Tab will move the cursor out to where it should be, but fills it in with spaces instead of a tab character. You can see this if you use tabs in your code and then copy/paste it into Edit+ and view the characters.

Thanks.
-Charlie


#5

Thanks for the clarification Charlie,

I hadn’t used the Tab characters, only the spaces!!
You were correct
(CR has been updated with your new comments)

Jaime