Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / The code auto-fill seems doesn't works well

Author
Message
XUTOMMY
2
Years of Service
User Offline
Joined: 2nd Jul 2021
Location:
Posted: 31st Oct 2021 13:17
I do remember that if I write a code like" function a()",then press ENTER, the IDE will fill " endfunction "automatically.But now it seems doesn't work anymore. So how to get the function back to work?
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 31st Oct 2021 15:49
Look at your settings in: Edit -> Preferences -> Editor -> Completions
Tiled TMX Importer V.2
XML Parser V.2
Base64 Encoder/Decoder
Purple Token - Free online hi-score database
Legend of Zelda

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
XUTOMMY
2
Years of Service
User Offline
Joined: 2nd Jul 2021
Location:
Posted: 1st Nov 2021 12:55 Edited at: 1st Nov 2021 22:49
Thank you . But it's still doesn't work.I guess it's a bug.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 1st Nov 2021 23:18 Edited at: 1st Nov 2021 23:22
i seem to remember this functionality, as well (and, promptly turned it off where it wasn't for me).

Edit -> Preferences -> Editor -> Completions doesn't do anything here, either (Studio 2021.09.30 WIN10)

meanwhile, i've removed the [Solved] tag since there is no solution in this thread other than to report the issue on github.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 1st Nov 2021 23:53 Edited at: 1st Nov 2021 23:55
The functionally you describe is called "snippet completion", although Geany supports snippets and its enabled by default in AppGameKit there are no entries in "snippet.conf", I don't know if there ever was but if so they have been removed.

Go, Menu>>Tools>>Configuration Files>>snippet.conf

Above [C] add this

Quote: "[AGK]
function=function (%cursor%) \r\n endfunction"


Add desired snippets, save, close and reopen AppGameKit ....

Usage instructions are at the top of the file

Edit: in that ^^ example, type function and hit tab
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
XUTOMMY
2
Years of Service
User Offline
Joined: 2nd Jul 2021
Location:
Posted: 5th Nov 2021 14:22
Well ,I can't find the configuration files in Appgamekit studio, and I got nothing after searching for the snippet.conf in the folder of Appgamekit .It's a bit inconvenient. I can't login to the git for these time ,So,it will be nice if you can post this to the github .
adambiser
AGK Developer
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 7th Nov 2021 22:06 Edited at: 7th Nov 2021 22:12
@Adam, I only found it myself recently while looking at the Geany plugin framework, its a powerful system, add some [Special] tags to format common text and use those tags to build chunks of code, add in some [Keybindings] and you can write a lot of code with hotkeys, why on earth is this not just a starndard feature but also shouted from the rooftops!!!



and as if by magic, type "select" and hit tab, a whole select statement, could be expanded to paste a whole state machine if so inclined.

@XUTOMMY, soz, this is a Geany feature not an AppGameKit feature but would certainly be nice to have in Studio.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
adambiser
AGK Developer
8
Years of Service
User Offline
Joined: 16th Sep 2015
Location: US
Posted: 8th Nov 2021 03:48 Edited at: 8th Nov 2021 05:32
@PTC: Yeah, I've been playing with it. I set up a keybinding for "Move cursor in snippet" (I chose Ctrl+Shift+Space since everything related to Tab is taken).
Then once can have:

With each %cursor% being a stop within the snippet and ctrl+shift+space to move to the next cursor location.

(still trying to find a nice keybinding for it)

Login to post a reply

Server time is: 2024-04-25 04:56:05
Your offset time is: 2024-04-25 04:56:05