Autocompletion = code snippets (IDE)

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
AZJIO
Addict
Addict
Posts: 2143
Joined: Sun May 14, 2017 1:48 am

Autocompletion = code snippets (IDE)

Post by AZJIO »

I would like a construct to be inserted when auto-completing keywords.
For example, instead of "if" the following would be inserted:

Code: Select all

If 
	
ElseIf 
	
Else
	
EndIf
I would like anyone to be able to edit code snippets however they want. I find it difficult to write in Latin letters, so I have to copy keywords from the help or from the current code. For me, this is a set of unrelated characters, it could be for example "uiehfiwms", I can make a mistake in any letter and it stops working. Therefore, I would like the required construct to be inserted in its entirety and I would not have to look for the keyword in the code or in the help.

I recently noticed that EndIf is a double word "End If". When I type it, I have to type "EndI" so that it is first in the list. That is, I can press the "f" key or the "Tab" key. This is not intended to make it easier to enter frequently used words. If I type "Nex" then "Next" appears first in the list, I have to press the "t" key or the "Tab" key. If I type "Cas", "Case" appears first in the list, I have to press the "e" key or the "Tab" key. If the entire code snippets had been inserted, there would have been no need for all this torment.
.

Code: Select all

Case #SCN_AUTOCSELECTION
	ScintillaSendMessage(SciGadget, #SCI_AUTOCCANCEL)
.
example of code completion in My_Notepad_Sci
example of code completion in AkelPad
example of code completion in AkelPad (entering code using Russian language)