Add known functions to auto-complete and auto-correct

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Mistrel
Addict
Addict
Posts: 3415
Joined: Sat Jun 30, 2007 8:04 pm

Add known functions to auto-complete and auto-correct

Post by Mistrel »

The IDE already "knows" what functions are available from other open files as they can be jumped to with a ctrl-doubleclick.

One of the things I really with the IDE would do is to add these functions to the auto-complete list and to also auto-correct their case so that I can type them out quickly all lower-case and have it automatically correct it.
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2071
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: Add known functions to auto-complete and auto-correct

Post by Andre »

+1
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: Add known functions to auto-complete and auto-correct

Post by Dude »

+1 from me as well. And please, let this work for Macros too! Been wanting Ctrl+DoubleClicks for Macros for years. They're basically the same as Procedures, so why not?
Marc56us
Addict
Addict
Posts: 1479
Joined: Sat Feb 08, 2014 3:26 pm

Re: Add known functions to auto-complete and auto-correct

Post by Marc56us »

Preferences > Editor > AutoComplete > Displayed Items

It works for me. Or did I misunderstand the question?

The auto-completion returns the capital letters as they are in the original file.

Only the auto-completion of the file being edited is updated with the new procedures

:!: The list of auto-completion procedures of the included files is however regenerated only at the time of their opening.
To regenerate the lists, I work in project mode and I close and reopen all the files at once. The list is thus updated with all Procedures, Macros etc.

The correction is not done automatically, but it is enough to get used to using TAB

If the IDE were to constantly check the existence of a user function, it is likely that this would slow down quite a bit. So the time that would be saved in typing would be lost in CPU time (I think). Oh, please don't turn the simple and fast PB IDE into a (slow) horror like the "modern" IDEs

:wink:
User avatar
Bisonte
Addict
Addict
Posts: 1232
Joined: Tue Oct 09, 2007 2:15 am

Re: Add known functions to auto-complete and auto-correct

Post by Bisonte »

I use the AutoComplete function with a generated code that is always loaded as the first tab in the IDE.
This code consists only of Declare calls.
Since I only use modules as includefiles, generating them is relatively easy.
My tool searches my include folder, opens every file, and when a DeclareModule block is found,
a new code is generated. This is of course not executable, but the autocomplete function works fine.
If I change the includefiles I just run the tool and the generated code is up to date again.
PureBasic 6.10 LTS (Windows x86/x64) | Windows10 Pro x64 | Asus TUF X570 Gaming Plus | R9 5900X | 64GB RAM | GeForce RTX 3080 TI iChill X4 | HAF XF Evo | build by vannicom​​
English is not my native language... (I often use DeepL to translate my texts.)
Post Reply