Author Topic: UPPERCASE More Than Just Keywords  (Read 1586 times)

cthomson

  • Community Member
  • Posts: 38
  • Hero Points: 1
UPPERCASE More Than Just Keywords
« on: March 07, 2021, 02:57:50 PM »
There are a few languages which are traditionally written in mostly uppercase... Basic, COBOL, and in my case SQL are some examples.  The current option to uppercase keywords is a godsend but I wonder why we can't do the same thing with other classes of syntax.

For example, I like to have various other elements such as function names, global variables, and data type names colored differently from keywords but still in uppercase.  Would it be possible to add the same sort of checkbox to uppercase those elements as is available in the keyword configuration?

Dennis

  • Senior Community Member
  • Posts: 3960
  • Hero Points: 517
Re: UPPERCASE More Than Just Keywords
« Reply #1 on: March 08, 2021, 03:41:10 PM »
I am going to file a feature request about this.  But first, would a feature that case-corrected identifiers based on symbol lookup be adequate?  This would mean that when you are defining a symbol, you need to type it's case correctly, but when you use the symbol, it's case would be corrected.  This would probably have to happen after you type a space or certain punctuation after a symbol.

cthomson

  • Community Member
  • Posts: 38
  • Hero Points: 1
Re: UPPERCASE More Than Just Keywords
« Reply #2 on: March 09, 2021, 08:10:24 PM »
Thanks Dennis!

I find the current implementation for SQL keywords works very well - there are radio buttons under SQL Server->Formatting in the Keyword case area that allow me to choose Uppercase along with a checkbox to Autocase keywords. However, I can see how that could become difficult to set up for multiple different syntax types.

I can see using the case to match how a symbol is defined in the list.  IOW, I would add words to my function or library symbol list as I do now but make sure I entered them in the case I would prefer when typing them into code.  This would be similar to aliases.

My suggestion would be to somehow include it with the coloring so that you could chose foreground color, background color, font style, and character case all in one place.  After all, the editor has to determine the word element and its delimiters in order to color properly... it shouldn't be too difficult to change the case at the same time as changing the color. (that's just the appearance to an outsider - I really don't know how difficult it would be to code.)  The difference is that if I decide sometime in the future that I want lowercase or proper case instead of uppercase then I would only have to change one setting.  With the "type them capitalized as you want them" list, I would have to go back and retype every keyword to change their case.

Thanks again.