#pragma mark for Ruby in TextMate

I (unfortunately in some ways) have to use TextMate for a bunch of Ruby code and it drives me nuts that TextMate’s Ruby bundle doesn’t have a #pragma mark equivalent, so I spent a while trying to figure out how to add one. This works.

1
2
3
4
5
        {   name = 'comment.line.number-sign.ruby';
            match = '(?:^[ \t]+)?(#)(:\s+(.*)$\n?)?(.*$\n?)?';
            captures = { 1 = { name = 'punctuation.definition.comment.ruby'; };
            3 = { name = 'meta.toc-list.pragma-mark.ruby'; }; };
        },

No Comment

Comments are closed.