SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Features and/or Improvements => Topic started by: cthomson on March 07, 2021, 02:57:50 pm

Title: UPPERCASE More Than Just Keywords
Post by: cthomson 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?
Title: Re: UPPERCASE More Than Just Keywords
Post by: Dennis 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.
Title: Re: UPPERCASE More Than Just Keywords
Post by: cthomson 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.