Autocomplete based on casing

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
nblackburn
User
User
Posts: 67
Joined: Mon Aug 19, 2013 1:22 am
Location: United Kingdom
Contact:

Autocomplete based on casing

Post by nblackburn »

I like to code in lower case or camelCase as I feel the language is more readable to me that way. It would be nice for the IDE to detect this and suggest completions in that case.

Considering the language is case insensitive I think this would be a great option to have and give the developer more flexibility instead of being forced to code in a very specific way (PureBasic doesn't follow the standards of Basic so why should we follow it's non-standard standards, just saying hehe 8) ).

Code: Select all

procedure = procedure != Procedure
Procedure = Procedure
Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Autocomplete based on casing

Post by PB »

Fred wrote:either case sensitive, either not. Providing both in the same programming language is not an option.
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
nblackburn
User
User
Posts: 67
Joined: Mon Aug 19, 2013 1:22 am
Location: United Kingdom
Contact:

Re: Autocomplete based on casing

Post by nblackburn »

PB wrote:
Fred wrote:either case sensitive, either not. Providing both in the same programming language is not an option.
I don't mean suggesting both, i mean if you choose to code in lowercase then instead of it autocompleting in sentence case it adjusts to your coding style. Why is that such a bad idea when we have the option to do this anyway, just not with autocomplete?.
Image
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: Autocomplete based on casing

Post by PB »

> instead of it autocompleting in sentence case it adjusts to your coding style

Oh, I see what you mean now. Yes, AutoComplete always uses the case shown
in the list, even if you type a command in all lower-case. Gotcha. But what
you're asking is a bit like mind-reading: how will the IDE know what case you
want to use? You could camel-case one word and then lower-case the next.
What's a poor IDE to do? :)
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
User avatar
Shield
Addict
Addict
Posts: 1021
Joined: Fri Jan 21, 2011 8:25 am
Location: 'stralia!
Contact:

Re: Autocomplete based on casing

Post by Shield »

Just put every single keyword in a file and then add it as your custom keyword list.
Correct case completion for you, sir, already built in. :wink:
Image
Blog: Why Does It Suck? (http://whydoesitsuck.com/)
"You can disagree with me as much as you want, but during this talk, by definition, anybody who disagrees is stupid and ugly."
- Linus Torvalds
Post Reply