Snippets and grammar for the Perch content management system.
In your terminal:
mkdir -p "$HOME/Library/Application Support/TextMate/Bundles"
cd "$HOME/Library/Application Support/TextMate/Bundles"
git clone git://github.com/bclennox/perch-tmbundle.git Perch.tmbundle
You also need to update the HTML bundle's grammar:
# somewhere around line 184
repository = {
embedded-code = {
patterns = (
{ include = '#ruby'; },
{ include = '#php'; },
{ include = '#smarty'; },
{ include = '#python'; },
{ include = '#perch'; }, # add this line...
);
};
# ...and this line
perch = { patterns = ( { include = 'text.xml.perch'; } ); };
}
Then choose Bundles > Bundle Editor > Reload Bundles.
perch: Call toperch_content()percht: Template tag for a text fieldperchb: Template tag for a text blockperchi: Template tag for an imageperchii: HTML<img>tag withsrcandaltattributes created as appropriate template tagsperchf: Template tag for a file uploadperchff: HTML<a>tag withhrefattribute and inner HTML created as appropriate template tagsperchs: Template tag for a<select>elementperchd: Template tag for a date selectorpercho: Template tag for a text field meant to be used with ordering in Perch 1.2
- Smarter regexps in the grammar might make it possible to switch the scope to
text.htmlwithin block-level Perch elements (like<perch:if>)
Inspired by Ad Taylor
See COPYING.