Keyword formatting too aggressive

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

Keyword formatting too aggressive

Post by kpeters58 »

One of my pet peeves:

If in the process of editing I accidentally remove the leading double quote from a literal string, PB immediately applies proper case to all PB keywords that might be inside the string.

I.e., for string = "Call 1-800-123457 for support and have your serial number ready in order to qualify for help." it will uppercase 'For', 'And' and 'To'.

If I don't pay close attention and just re-add the leading double quote, I am left with improper English spelling. This has already happened a number of times. I am very aware of this now and pay close attention to it, but I wonder if there is a better way.

After all, I just deleted a leading quote and there is a terminating quote - it should be possible to not auto-format in such cases....
PB 5.73 on Windows 10 & OS X High Sierra
IdeasVacuum
Always Here
Always Here
Posts: 6425
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: Keyword formatting too aggressive

Post by IdeasVacuum »

+1
Of course if it only just happened you can hit UnDo, but when such things slip through the gaps they are indeed annoying!
In UltraEdit, since you now have just the trailing speech mark, everything after the speech mark becomes syntax-highlighted as being a string literal and so you notice your error immediately. If PB could do that it would be great.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
HanPBF
Enthusiast
Enthusiast
Posts: 564
Joined: Fri Feb 19, 2010 3:42 am

Re: Keyword formatting too aggressive

Post by HanPBF »

If You switched on "Enable Case Correction" seems to be very difficult to see "accidently removing of quote"...
Simply switch option off.


For autocompletion:
I'd like to see the three formatting options for keywords/functions (especially when auto completing!):
- camelCase starting with lower case letter
- CamelCase starting with upper case letter (for the old BASIC style)
- all lower/upper (who ever wants this)

I prefer camelCase; the old C-style for functions and upper case for variables (expect iCount;-).
Post Reply