Different Format in Monaco Editor (2 Viewers)

JTrilloJ

Member
Local time
Today, 22:09
Joined
Feb 17, 2020
Messages
68
Without making any changes to my databases, when I open queries in the Monaco SQL editor, they appear differently.
Some have fields separated by lines, but others are displayed in blocks.
Do any of you know why this happens, and more importantly, how can I get the fields to appear in lines?
See attached image.
Thanks in advance.
 

Attachments

  • DifferenFormat.jpg
    DifferenFormat.jpg
    347.9 KB · Views: 11
I can't say for sure but the query on the left was probably formatted by you and saved that way. The one on the right was formatted by Monaco. It is possible that once you modify a query using Monaco and save it, that Monaco may reformat it but I never noticed that happening. Probably because I tend to use the QBE view when working with queries unless the query is complicated and QBE obscures the where clause.

Even the old editor would not reformat your code UNLESS you switched to QBE view and modified the query there. THEN the editor would remove all your pretty-print formatting which caused many people to resort to writing SQL in VBA regardless of how painful that was. Monaco may do the same. Now that we have a choice of opening the query in SQL view, I choose the view I want to work in depending on the query.
 
Thanks, Pat, for your response.
I can assure you 100% that I didn't manually format the query on the left.I have a few more in that format, and several in a block.
For someone with more knowledge than me, it's probably not a mystery, but for me it certainly is.
Best regards.
 
I just looked a a few databases. One I'm currently working on plus some old ones. I thought maybe I would see differences but Monaco opens even queries that were created years ago and never edited using Monaco and shows them in the field list format rather than the mushed string it used to use. So, the mystery remains.
 
You actually *want* to see the query formatted as in the example on the right?
David: What I'd like is to see the query like the left side.
That is, with one line per field.
As I mentioned to Pat in my Post #3, I already see several like this.
On the other hand, I see others in a block, with the fields joined together (separated with a comma, of course):
I'm not considering the Gasman option (regards) at the moment because I think the new visualization and the features of the new "Monaco" editor are good.
Best regards, JTJ
 
David: What I'd like is to see the query like the left side.
That is, with one line per field.
Ah OK, good!

I thought you were saying that the editor was formatting it like the left side, but you wanted it to remain like the right side! 🤪

I'm afraid I don't have anything useful to offer as a solution, except keep a copy of your queries properly formatted in a separate text file using a good editor. But I know that is not practical.
 
Thanks again, David:Just a few minutes ago, I found an article by Colin Riddington (Isladogs), which mentions that using Ctrl+K to convert it to Line Formatting by Field.
I assume it's coming in a new update, because I run it and it doesn't do anything.
The article is quite comprehensive and graphic.
There are several screenshots.If anyone is interested, you can access it at: Isladog Web
Regards, JTJ:
I saw the jdraw post. I'll take note, and thank you.
 

Users who are viewing this thread

Back
Top Bottom