Today I switch from Sublime to Atom and discover the snippet functionality (maybe Sublime have it too)
It’s just shortcuts for bit of text you use frequently, so I made some for kirby.
you just start to entering the keyword, hit tab, and all the code is created, with possible code edit when you press tab again. Useful for long chainings or repetitive code like echo the page title.
Some example:
If you use Atom you can copy this to your snippets.cson and adapt it to your needs:
Maybe it’s possible to transfer that sublime-snippets to Atom. I won’t have time to do it on my own alone, but with some help of other Atom-Users, this might be a good thing.
Whoever is interested, tell me, I’ll open up a repo on GitHub and we can start working on it.
btw. whoever want’s to update that sublime-text-snippets, feel free to work on it. Just send me a message and I’ll add you as contributer to the repo or something like that.
I converted my Espresso autocomplete plugin to a json inspired by Atom Autocomplete Providers with a few regular expressions. It’s pretty extensive and covers the whole Kirby docs with a “read more” link and everything.
Since @judbd created snippets for a few functions I thought he could easily adapt my json and add everything.
I sadly never figured out how to create a autocomplete plugin for Atom that extends, suggests, sets the cursor and so on. That’s something a bit more productive than just “snippets”. I also went back to using Espresso again. The json of the Kirby docs is the most work though I suppose, so at least that’s already done