Kirby 3 autocompletion for Sublime Text?

I just discovered this repo from @thguenther with autocompletion for Kirby methods on Panic’s Nova

Is there anything similar for Sublime Text 3 ? I can only find something for Kirby 2

Thank you!

Hi Plagasul

I think, that you’re talking about this package, made for Kirby 2? This is the only package I know for SublimeText, and the owner archivated it. But if someone want’s to maintain the package, he’s open for that.

I’m guessing, that most of the autocompletion from Kirby2 will work on Kirby3. Example: The snippet he uses here is looking good compared to this. So give them a try - individually or as mass-download. :wink:

I don’t know, if you’ve ever played with snippets in SublimeText. It’s pretty straight forward:

When developing your project, you can easily add your own snippets. The best part of it: You know exactly, what your TabTrigger is.

1 Like

Thank you very much for your answer, @Denis

Hey,

yeah, I stopped working on that some time ago. But there is a javascript in there, which is parsing the docs and then generating the snippets. Maybe this javascript can be modified to also work with the K3 and Sublime 3. It may not be that complicated, I guess.

Hey @mauricehh!

Oha, sorry for bringing old things to daylight. :slight_smile: I’m in trouble reading and writing HTML / CSS / PHP. :crazy_face: So Js is out of scope… To me I’ll be very complicated. So I’ll design my snippets by myself… :innocent:

Actually @mauricehh, other than the regexs it does not seem too complicated to adapt to the actual reference. Which is very well structured.

Do you think that the package/snippets will work as is with kirby 3 ? or may it need changes other than rebuilding the script and the resulting snippets?

Thank you both

I guess, a lot of the snippets might work (as long as the snippet format didn’t change from subline 2 to sublime 3). But between K2 and the current state of K3 a lot of stuff happend, so there might be some deprecated methods in there or methods which need other parameters.

You might be able to use a lot of the snippets, but they might be an error source as things changed over time.

But if you know some basic JavaScript and HTML you might be able to adapt the javascript, which is just parsing the html of the docs and then go into the detail views of the methods and get the params from the details page. This should be even easier now, because https://getkirby.com/docs/reference/ uses those nice tables for all the params and options.

Maybe there is somebody to team up with.
I can answer some questions if you have, but as I am now using VS Code and spend my time mostly in maintaining my kirby plugins, I won’t be able to adapt the JS myself.

No problem, if they’re still helping someone out there, it’s a good thing :slight_smile:

Thanks,

I understand the parsing js needs to be adapted to the new reference page and so all the snippets will be generated anew. And, as I said, apart from the regex, which is always a hassle, it does not seem like too hard of a problem.

My question was precisely regarding snippet format, package control, etc. I said “kirby 3” meant “ST 3” sorry. But from your answer I assume you are unsure about this.

In any case I forked the thing and will give it a look asap. I may leave a question or two in the issues of that repo if that is ok, or here if you prefer.

Cheers!

Alright, I think it’s better to use the issues for questions, that’s more in my awareness :+1:t2:

1 Like

@plagasul
So you’ll trying to implement Kirby 3 for SublimeText 3? That’s great! :+1: If you need some kind of beta-testing, I’m here to help.

1 Like