Limit the code completion to ENTER key

If there is something important you think is missing in the current version of ZGameEditor then you can post a feature request here!

Moderator: Moderators

Post Reply
User avatar
Ats
Posts: 927
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Limit the code completion to ENTER key

Post by Ats »

Sorry, but the code completion in ZGameEditor is super annoying when you are not paying attention...
Just type the sentence “in a car or a boat”, you get “indexOf abs car ord abs boat”.

My suggestion: only the ENTER key should validate the code completion, not the SPACEBAR :wink:
User avatar
VilleK
Site Admin
Posts: 2414
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Limit the code completion to ENTER key

Post by VilleK »

I see what you mean but surely you have to press "ctrl + space" to open the code completion? If I just type "in a car or a boat" here I get no completion. So I've never noticed a problem like what you describe.
User avatar
Kjell
Posts: 1980
Joined: Sat Feb 23, 2008 11:15 pm

Re: Limit the code completion to ENTER key

Post by Kjell »

Hi guys,

Technically it's not just Ctrl+Space .. the auto-completion dialog also pops up when you stop typing for (approximately) 3 seconds.

Anyway, even though i've never ran into this issue myself either, i do agree that insertion of the selected dialog item should only happen when pressing the Enter key ( or by clicking on a item using the mouse ).

K
User avatar
Ats
Posts: 927
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Limit the code completion to ENTER key

Post by Ats »

I'm not pressing ctrl+space. The auto-completion always pops up while typing. That's one of the reasons I switched to SublimeText... So for typing my example, I do
in [escape] [space] a [escape] [space] car or [escape] [space] a [escape] [space] boat.
Which is tedious :lol:

I have no special keys pressed. My keyboard is AZERTY if it helps.
the auto-completion dialog also pops up when you stop typing for (approximately) 3 seconds.
I don't have that. But I have an empty auto-completion that I have to close with ESCAPE if no words are found while typing.


Edit:

I tried typing :
in [CTRL+SPACE]
This also validates the first suggestion "indexOf".

I'm running Windows 11.

Here's my ZGameEditor.ini if it helps:

Code: Select all

[Designer]
CodeEditorFontName=Consolas
LastOpenedProject=C:\Omeganaut\Omeganaut.zgeproj
GuiLayout=0
CodeEditorFontSize=10
Scaling=100
LastOpenedPath=C:\Omeganaut\
Width=3456
Height=1408
IsMaximized=1
MruList=C:\Omeganaut\Omeganaut.zgeproj
LowerRightPanel.Height=801
LogPanel.Width=203
LeftPanel.Width=276
PackerProg={$toolpath}upx.exe
PackerParams={$exename}
CodeCompletionDelay=100
Style=Windows
AndroidSdkPath=C:\Android\android-sdk-windows
AndroidSdCardPath=/sdcard/
AndroidAntPath=C:\Android\apache-ant-1.10.15
AndroidKeystorePath=C:/Android/license/android.keystore
AndroidKeystoreAlias=TxoriUP
UseThreadedProcessing=1
CodeEditorFontName=
HelpComponentURL=https://www.zgameeditor.org/index.php/ComponentRef/
RemoveUnusedComponents=1
The struggle:
ezgif.com-optimize (1).gif
ezgif.com-optimize (1).gif (149.87 KiB) Viewed 1302 times
I don't mind having the code completion always poping up. But SPACE should not validate the suggestion :lol:
User avatar
VilleK
Site Admin
Posts: 2414
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Limit the code completion to ENTER key

Post by VilleK »

Aha I see this in your ini-file

CodeCompletionDelay=100

Try increasing that value :)
User avatar
Ats
Posts: 927
Joined: Fri Sep 28, 2012 10:05 am
Contact:

Re: Limit the code completion to ENTER key

Post by Ats »

I just tried 10000 (10 seconds !), it doesn't change a thing. Suggestion opens instantly and validates the first thing it finds with the spacebar.

Edit :
I needed to reboot ZGE for the new number to be taken into account :D
But still, I have no problems with the suggestions opening instantly if they are validated with ENTER. How do they do it in big IDE such as Visual Studio?
User avatar
Kjell
Posts: 1980
Joined: Sat Feb 23, 2008 11:15 pm

Re: Limit the code completion to ENTER key

Post by Kjell »

Hi Ats,
Ats wrote: Tue Dec 09, 2025 3:03 pmHow do they do it in big IDE such as Visual Studio?
In Visual Studio the IntelliSense dialog pops up as soon as you start typing ( if there's anything to suggest ). When there are still multiple possible suggestions, pressing the spacebar will close the IntelliSense dialog and add a space to the document. But when there's only one possible suggestion left, spacebar will actually insert the suggestion instead.

K
Post Reply