Sublime Text Kirby2 Snippets

Hey there!

I just did some work on my website and - as a sublime text user - thought, it would be so nice, to have kirby2-autocomplete. So I started creating some snippets based on the cheat-sheet. Basically currently this are all the $page-methods. Of course, I’d like to add the rest, too.

I hope it will be available in Package Control soon, so everybody can use it.

And I’d like to invite you, to help growing the snippet-collection. You can find the repository on Github: https://github.com/mauricerenck/sublime-kirby2

6 Likes

This is a super nice idea. Thanks for sharing!
I’ve created a few snippets in TextExpander too.

1 Like

The package just got merged into the Sublime Text Package Manager, you can now install it by searching for “Kirby” in package control :smile:

1 Like

Well, i was procrastinating as fuck, not doing the exact same thing. Thanx, you made my todo list a little less heavy :smile:

Edit > Wait… you do not escaping properly the “$” in “$page”. An example of mine :

<snippet>
    <content><![CDATA[
<?php echo \$site->${1:myField}()->html() ?>
]]></content>
    <tabTrigger>ksitechamp</tabTrigger>
    <description>Kirby siteTag</description>
</snippet>

In the snippets, I do not use the prefixed $ at all, currently. May be a good idea to change.