Editor capitalization but not in JS code

Got an idea for enhancing SpiderBasic? New command(s) you'd like to see?
ljgww
Posts: 26
Joined: Thu Mar 26, 2020 5:47 pm

Editor capitalization but not in JS code

Post by ljgww »

If you turn on keyword capitalization ON in settings, editor will auto-correct keywords like: procedure -> Procedure or endif -> EndIf

Its all fine and dandy if one is writing just SpiderBasic code but once you EnableJS and write some Javascript code capitalization still works. I have had a numerous issues that code is not working in JavaScript until I noticed that if i type 'if' in Javascript section it gets turned to 'If' (with capital I). Since Javascript is case sensitive it fails to recognize 'If' and produce an error.

It took me a while to figure this out.

Now, when I write JS code I do switch capitalization off in the options, and if I do not touch JS code it is OK. But this is a bit annoying to remember always to switch it on and off as needed depending if you write JS or SB code. And the option is deep in settings (take navigation and 4-5 clicks to change it)

It would be nice to have some method to control this better. Or perhaps to have some sort of a shortcut. I am not aware that there is some keyboard shortcut to do this quickly, even preferences do not have keyboard shortcut, so one needs a mouse.

Config option is in File, Preferences, Editor, Editing, Enable Case correction.