Is there an IDE custom autocomplete?

Just starting out? Need help? Post your questions and find answers here.
acreis
Enthusiast
Enthusiast
Posts: 234
Joined: Fri Jun 01, 2012 12:20 am

Is there an IDE custom autocomplete?

Post by acreis »

Hello!

Is there an IDE custom autocomplete integrated in IDE?

For instance, I would like to type ]ismainfile and get it replaced by CompilerIf #Pb_Compiler_IsMainFile

Strangely autohotkey doesn't work in Purebasic IDE.

Any Ideas?
Axolotl
Addict
Addict
Posts: 873
Joined: Wed Dec 31, 2008 3:36 pm

Re: Is there an IDE custom autocomplete?

Post by Axolotl »

acreis wrote: Tue May 28, 2024 1:19 pm Hello!

Is there an IDE custom autocomplete integrated in IDE?

For instance, I would like to type ]ismainfile and get it replaced by CompilerIf #Pb_Compiler_IsMainFile

Strangely autohotkey doesn't work in Purebasic IDE.

Any Ideas?
I am not sure, because I use a lot of autohotkey "hotstrings". And almost all strings work (very) well on all scintilla based text editors including the PB-IDE.
An answer to your question is below. (Upps found out, that it works in this editor as well).
A limitation with the PB 6.10 seems to be the starting char ]. I replaced it with ;
Second limitation is that the IDE acts on some strings very strange compared to notepad2, for example.
My suspicion: The own autocomplete mechanism.

Hint: co --> + Ending Characters i.e. SPACE (Ending Characters are removed)

Code: Select all

:co:;ismainfile::{home}CompilerIf {#}Pb_Compiler_IsMainFile {enter 2}CompilerEndIf {enter}{up 2}{tab}
Just because it worked doesn't mean it works.
PureBasic 6.04 (x86) and <latest stable version and current alpha/beta> (x64) on Windows 11 Home. Now started with Linux (VM: Ubuntu 22.04).
acreis
Enthusiast
Enthusiast
Posts: 234
Joined: Fri Jun 01, 2012 12:20 am

Re: Is there an IDE custom autocomplete?

Post by acreis »

Thanks AZJIO and Axolotl,

Code: Select all

:co:;ismainfile::{home}CompilerIf {#}Pb_Compiler_IsMainFile {enter 2}CompilerEndIf {enter}{up 2}{tab}
Works for me!
Post Reply