Case control (suggestion)
Case control (suggestion)
Would it be possible to have complete control over upper / lower case of constants, keywords and procedures? Including built-in items and standard libraries. I think it would be more elegant and readable to have everything lower case, except for #CONSTANTS, like modern languages.
Re: Case control (suggestion)
(Pure)BASIC is not case sensitive.Joubarbe wrote: ↑Tue Jan 04, 2022 9:19 am Would it be possible to have complete control over upper / lower case of constants, keywords and procedures? Including built-in items and standard libraries. I think it would be more elegant and readable to have everything lower case, except for #CONSTANTS, like modern languages.
You can disable the auto-correction of the IDE and write as you want.
Preferences > Editor > Editing > [ ] Enable Case correction
Re: Case control (suggestion)
No that doesn't work. If you use autocomplete (and of course you do), standard functions will be capitalized. Same for constants (and I would like them UPPERCASE). This case correction option doesn't really do much.
Re: Case control (suggestion)
Yes, but It was not specified at first that you wanted this option with auto-completion.
Or typing error?
Yes, you are right, auto-completion auto change case even with uncheck option.
Or typing error?
Would it be possible to have complete control over upper / lower case
Thank you for being precise in question and translationsNo that doesn't work. If you use autocomplete
Yes, you are right, auto-completion auto change case even with uncheck option.
Re: Case control (suggestion)
[Edit] Doing the below is probably against the Terms and Conditions of PureBasic's license. If you do it anyway, you must NOT share the modified files!
If the team doesn't do your request: you can hack it, but it's a lot of work. (Although you could write a tool to automate it). All you need to do is hex edit all the commands in all files the "PureLibraries" folder, and rename them to be lower-case. Then the editor will auto-complete them to that case.
I just tested it by editing the "PureLibraries\Clipboard" file to rename GetClipboardText() to getclipboardtext():
Then, in the editor, it auto-completes like this:
Just make sure you don't leave any backup files in the library folder, or PureBasic will complain about duplicate commands. (I use HxD to edit, and it creates a ".bak" file after editing, which I need to delete to avoid the PureBasic warning).
So... a nice little coding project for you to bulk-convert all the commands in the folder? Hehe.
If the team doesn't do your request: you can hack it, but it's a lot of work. (Although you could write a tool to automate it). All you need to do is hex edit all the commands in all files the "PureLibraries" folder, and rename them to be lower-case. Then the editor will auto-complete them to that case.
I just tested it by editing the "PureLibraries\Clipboard" file to rename GetClipboardText() to getclipboardtext():
Then, in the editor, it auto-completes like this:
Just make sure you don't leave any backup files in the library folder, or PureBasic will complain about duplicate commands. (I use HxD to edit, and it creates a ".bak" file after editing, which I need to delete to avoid the PureBasic warning).
So... a nice little coding project for you to bulk-convert all the commands in the folder? Hehe.
Last edited by BarryG on Tue Jan 04, 2022 11:46 am, edited 1 time in total.
Re: Case control (suggestion)
Haha, too complicated
Maybe I should look at the IDE source actually... It's on GitHub now.
Maybe I should look at the IDE source actually... It's on GitHub now.