Hi Tom, I see your point. This is my first attempt ever at creating a textmate language def and I'm a newbie at Hobo, so I'm sure lots of you Hobo pros can come with better suggestions for how to create a useful language def. However, as I understand it, Textmate can be instructed to treat sections as either inline or block elements and allow folding for certain types of blocks. So, for tags that are containers, such as <page> or <def>, it would make sense to instruct textmate to treat these as a block and perhaps also with folding. For other tags, such as <name>, it would make sense for textmate to treat it as an inline tag I guess. Anyways, the language def I created also allows for *any* tag to be used, I just found it would perhaps be useful to define block/inline/ folding rules for the tags defined for DRYML. Custom DRYML tags would just be treated as *any* tags, with no special textmate treatment...
Would be cool to also include some quick-snippets, such as "def-ctrl- space' creating: <def name="[cursor here]"> ... </def> and similar perhaps for extend, page, repeat and other block elements? Perhaps the Rails bundle could also be extended with a Hobo addon, for "fields do", permission system methods etc? To use/import the DRYML bundle in textmate ---------------------------------------------- Go to bundle editor, select "languages" in dropdown (to filter on languages only) Click "new language" (bottom left '+' icon) : should create a new bundle in list of bundles with a single language under it, call the new bundle "Hobo" and the language "DRYML" Open the new RYML language and copy-paste the DRYML language definition I posted into the editor area. Click "Test" button to test that textmate can parse and understand it correctly. Close the Bundle editor. Restart textmate. Open .dryml file. Enjoy! Add snippets and other cool textmate stuff under your new Hobo bundle (see textmate tutorial screencasts) and share for others to enjoy! Kristian On Aug 26, 12:46 pm, Tom Locke <[email protected]> wrote: > Hi > > Thanks for posting this. I have a DRYML mode that I use but it's a bit > broken (I never learnt textmate language definitions properly) so I've > not shared it. > > A couple of comments on yours > > - I don't think we want to list all the names out as special, e.g. > like you've done with head, body etc etc. A tag is just a tag, and > "our" tags should not be highlighted differently from "your" tags. > > - We need a capture for the name that shows up in a <def> or an > <extend> so that we can put them in the symbols menu, which also gives > very nice fast navigation with cmd-shit-T. > > I have this in the language > > { name = 'tag.def.dryml'; > match = '^\s*<(?:def|extend)\s+tag="([^"]*(?:.*for="[^"]+)?)'; > beginCaptures = { 1 = { name = 'tag.def.dryml.name'; }; }; > > } > > and this in the preferences > > { showInSymbolList = 1; > symbolTransformation = ' > s/" for="/ for /g; > '; > > } > > But unfortunately it breaks the syntax highlighting on the <def> and > <extend> lines. > > Any ideas? > > Tom --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/hobousers?hl=en -~----------~----~----~----~------~----~------~--~---
