I can see exactly what I typed:
"select * from my_table where id = 1;"
I would like to see capitalised keywords:
"SELECT * FROM my_table WHERE id = 1;"
Under Tools -> Preferences -> SQL, where I can set the colors and other attributes the of individual content categories, I would like to have a checkbox "[X] Capitalized". I would love to turn it on for Reserver Words.
Version 9.5.0.5277 (64 Bit)
Compiled on: 2018-04-19 05:52:03
Environment: Windows v6.1
That is what the "Auto reformat" feature is meant for.
Just click the button on the main toolbar with the white page and a paintbrush on it.
Thanks for the quick asnwer. :)
I don't think they are the same.
My proposal would capitalise "select" right after pressing the last character ("t") while the toolbar button requires deliberate activity from my side
The toolbar changes the indentation as well which I would hate. I know why I indented my query in the way how I did and I don't want any software to re-indent it, unless I explicitely ask for it.
Yes, I noticed your wish is different, only I don't want to implement similar things two times.
There is a second way to accomplish that: start typing "sel", press Ctrl+Space, which should offer the completion proposal with the SELECT keyword, then press Enter to overtake it.
I understand this but I still think it would be a very useful feature because Ctrl+Space is much less convenient.
For example, when I type "from" then Ctrl+Space offers three options:
Unfortunately I cannot use Heidi at my workplace and I have to use SequelPro for Mac which does this autoformat thing. I don't reallt like SequelPro but this is a feature of it I really love and would love it in Heidi as well.
UPDATE: just one more tought. There are three different things but they have different purposes as well:
So, my suggestion would not implement the same functionality that we have somewhere else. It is a new feature.
Makes sense now!
I have just pushed some code extension which now by default transforms the previous reserved word, data type or function to uppercase. Users can disable this feature, in Preferences > SQL > "Auto uppercase..."
Please update and test.
Already found some bugs, which should be fixed in the upcoming Heidi build. Please retest if not done already.
Oh, great news, thank. :)
I installed Version 9.5.0.5293 (64 Bit) and works nice. Thanks. :)
However, it is not exactly what I asked for. I thought you implement it more similarly to the syntax highlighting. I expected a checkbox where the Bold and the Itcalic checkboxes are. That implementation whould make it possible for the user to capitalize/not capitalize function names, keywords, tablenames, independently from each other. I think it would be more felixible.
There is one more think. It is a bit strange that I type "select" and right after "t" the color is changing but the capitalization happens only one character later, when the space also is pressed. Is this indented? Why does it indicate to be a keyword by color change earlier than it indicates the same thing by capitalizing?
I would like to request a little bit more intelligence too
Typing
select t.name from mytable t
produces
SELECT t.NAME FROM mytable t
But I expect
SELECT t.name FROM mytable t
Essentially, coulmn names _can_ be reserved words but shouldn't be automatically capaitalized.
problem is actual
https://media.giphy.com/media/7XuzDMd2NMc2uX1cSB/giphy.gif
Version 9.5.0.5444 (64 Bit)
Most helpful comment
I would like to request a little bit more intelligence too
Typing
produces
But I expect
Essentially, coulmn names _can_ be reserved words but shouldn't be automatically capaitalized.