Keyword Case

Apologies for the noob UI question, but is there a way in the code editor to automatically convert (say) ‘string’ to ‘String’ as it’s typed?
I know that when you see the ‘…’ you can type TAB but I don’t always remember to do that. :frowning:

It’s doing my head in that I have to actually type proper case for my keywords, i.e. dim/Dim, etc.

Is this a setting somewhere?

As you type - no - there’s no setting for that

There is a setting in Preferences (or options) > Coding > Standardize Format that will get applied when you press enter

AWESOME! … “That’ll do donkey, that’ll do”. :slight_smile:

http://developer.xojo.com/2017r1-release-notes
4155 IDE » Miscellaneous Made it so you can have “Standardize Format” act when you hit return (to finish a line), when you paste a block of text or when you hit “super return” to finish a block.

You guys rok! … Love this forum. :wink:

and then there is this one :slight_smile:

<https://xojo.com/issue/45743>

Already had the picture as a more complete answer to the OP and I really didn’t remember if we added it in 2017r1 or 1.1 or when

http://developer.xojo.com/release-notes

Very nice feature. I missed that somehow.

According to the documentation…

When I press Shift+Return at the end of an if statement my if statement is not formatted. According to the above I would expect it to.

As you type, if you use the TAB key to auto-complete, it formats it for you…

[quote=337366:@Neil Burkholder]
When I press Shift+Return at the end of an if statement my if statement is not formatted. According to the above I would expect it to.[/quote]
Thats this bug fixed for a future release <https://xojo.com/issue/48343>

As a bit of quirkiness, (at least on Windows, I don’t have a Mac to try it on) with standardizing on, if you enter #prag and hit TAB to complete it the ‘p’ gets uppercased. When you hit enter to complete the line, it lowercases the ‘P’. No real problem, just a little quirky.

not quirky at all

go back to a version that did not have this feature in it
type in

#pragma breakonexceptions
#if foo
#endif

select all these lines & right click and select “Standardize format”
they all get title cased

the new feature simply extends when this happens (on pressing return) but doesn’t change what gets handled or how it gets handled

Uh, no, Norman.

What I feel is quirky in it is that if you use TAB for auto-completion on #prag then the P in Pragma gets title cased but reverts to lower case when you hit Enter to end the line. Why bother title casing it if you’re just going to lower case it later?

BTW, on Windows using Xojo 2017r1.1, if you follow the exact steps you described, the P in #pragma is lower cased, not Title Cased.

A bug report seems in order

<https://xojo.com/issue/48492>

EDIT : and fixed