Page 1 of 1
Improve auto-completion
Posted: Wed Sep 13, 2017 10:22 am
by Sicro
For example, the end keyword should be added as soon as you press the enter key in the start keyword line.
should result in:
The same for all the other commands:
While...Wend
Repeat...Until
For...Next
Procedure...EndProcedure
Module...EndModule
and so on
Edit:
My feature request as a animated gif image:
(Wait until the gif image is loaded)

After ";seconds" I press the enter key.
Re: Improve auto-completion
Posted: Wed Sep 13, 2017 2:39 pm
by davido
Now, that would be nice.
+1
Re: Improve auto-completion
Posted: Wed Sep 13, 2017 3:41 pm
by Little John
In the Preferences of the IDE, under "Editor" > "Autocomplete", there is already this option:
[ ] Add matching 'End' keyword if insert is pressed twice
According to the
explanation in the manual, we should not press [Insert] but [Tab] or [Enter] for this purpose.
Add matching ‘End' keyword if Tab/Enter is pressed twice
If you press Tab or Enter twice, it will insert the corresponding end keyword (for example "EndSelect" to "Select" or "EndIf " to "If") to the keyword you have just inserted. The end keyword will be inserted after the cursor, so you can continue typing after the first keyword that was inserted.
However, this feature
seems not to work here (PB 5.61 x64 on Windows 10).
BTW: Why
twice? Pressing [Enter]
once should be enough, no?

Re: Improve auto-completion
Posted: Wed Sep 13, 2017 4:06 pm
by Bisonte
Little John wrote:However, this feature seems not to work here (PB 5.61 x64 on Windows 10).
I not agree. This feature works. the first TAB to set the word from autocompletepopup and the second TAB to write the "end" keyword.
But the text in the preferences window of the ide says not TAB/Enter it says "insert", so the manual have to be updated to "the inserting key" or similiar...
Re: Improve auto-completion
Posted: Wed Sep 13, 2017 4:18 pm
by Little John
Bisonte wrote:Little John wrote:However, this feature seems not to work here (PB 5.61 x64 on Windows 10).
I not agree. This feature works. the first TAB to set the word from autocompletepopup and the second TAB to write the "end" keyword.
Thank you for the information!
Well, this is not how I expected it to work.
I don't use autocompletion e.g. when I write
If. I type
If manuallly, and then press [Enter] once or twice, and
EndIf is not inserted automatically. So autocompletion of the "opening" keyword and autocompletion of the "closing" keywored should be handled independent from each other, IMHO.
Re: Improve auto-completion
Posted: Wed Sep 13, 2017 7:40 pm
by davido
I use this feature all the time, however, I think that, Sicro was requesting that this feature works even if code is added after the keyword.
My first thought was that this was subtly different. Hmm... not so sure now.
Re: Improve auto-completion
Posted: Wed Sep 13, 2017 11:37 pm
by chi
Little John wrote:I don't use autocompletion e.g. when I write If. I type If manuallly, and then press [Enter] once or twice, and EndIf is not inserted automatically
You can 'kinda' do this with my
IDE Tool. Type
If and press Shift+Return...
Re: Improve auto-completion
Posted: Thu Sep 14, 2017 5:32 pm
by Sicro
@all
I added an animated GIF image to my first post that hopefully will make my request clearer.
@Little John
I know that such a similar function is already integrated in the IDE. But it's ugly when I write "If" and after pressing the TAB key twice, the "EndIf" hangs behind the text cursor as long as I keep writing.
@chi
Nice IDE tool. Unfortunately, it doesn't support Linux and autocomplete only if nothing is written after the "If".
Re: Improve auto-completion
Posted: Thu Sep 14, 2017 6:32 pm
by Little John
@Sicro:
I absolutely agree with you. I didn't make that clear previously, sorry!
What you are demonstrating above is exactly the way how I am writing code.
I would appreciate this suggested feature very much!
+1