[IDE] Autocomplete tips enchancements

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Korolev Michael
Enthusiast
Enthusiast
Posts: 200
Joined: Wed Feb 01, 2012 5:30 pm
Location: Russian Federation

[IDE] Autocomplete tips enchancements

Post by Korolev Michael »

At first, autocomplete window needs to get wider:

Image

Second, change behaviour of TAB key in this help tip. At this moment, by pressing TAB, we accomplish currently selected command. I propose better way.

When you type

Code: Select all

#PB_Ev
and then press TAB, IDE shows

Code: Select all

#PB_Event
Why? Because we have three possible continuations:

Code: Select all

#PB_Event3D
#PB_Event_
#PB_EventType_
then, you type "T" key then press TAB, IDE shows all

Code: Select all

#PB_EventType
commands.

Then, you type "_" to weed out "3D" commands, then type "D" to show all "Download" variants, e.t.c...

Got the idea? If not, see Unix-way command-line prompting completion on wikipedia
Last edited by Korolev Michael on Wed Oct 02, 2013 3:06 pm, edited 1 time in total.
Former user of pirated PB.
Now registered user :].
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Re: [IDE] Autocomplete tips enchancements

Post by PB »

Both suggestions have been in the Preferences for years.

Well, you don't press Tab to complete, but you can tell it to only
show items starting with what you've typed, which is the same
end result (typing "_" to weed out "3D" commands, etc).

Here's what I see when I type "#PB_Event_" into the IDE.
A nice window size, with "3D" commands weeded out. ;)

Image
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Korolev Michael
Enthusiast
Enthusiast
Posts: 200
Joined: Wed Feb 01, 2012 5:30 pm
Location: Russian Federation

Re: [IDE] Autocomplete tips enchancements

Post by Korolev Michael »

Oh gosh, I need to look at preferences more often...

@PB, second question works if your weeding letter is one, that would be enough. But if you want to reach #PB_Sprite_BlendInvertDestinationAlpha, manual way will be long enough. Prompt-TAB way will be much faster.

Whole sequence:
#PB_Spr[TAB]Bl[TAB]I[TAB]D[TAB]A

Of cource, you can reach keyword using up-down narrow keys, but this way is not... true :)
Former user of pirated PB.
Now registered user :].
Post Reply