Page 1 of 1

Is there an IDE custom autocomplete?

Posted: Tue May 28, 2024 1:19 pm
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?

Re: Is there an IDE custom autocomplete?

Posted: Tue May 28, 2024 5:10 pm
by AZJIO

Re: Is there an IDE custom autocomplete?

Posted: Sat Jun 01, 2024 1:43 pm
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}

Re: Is there an IDE custom autocomplete?

Posted: Sun Jun 02, 2024 10:37 am
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!