[TxMt] Defining functions in bundle
Allan Odgaard
throw-away-1 at macromates.com
Sat Jul 29 18:12:49 UTC 2006
On 29/7/2006, at 16:14, cormullion at mac.com wrote:
>
> { name = 'declaration.function.lisp';
> match = '(\b(?i:(def\-new|define(-macro)?))\b)(\s+)((\w|\-|\!|\?)
> *)';
> captures =
> { 2 = { name = 'keyword.control.function-type.lisp'; };
> 4 = { name = 'entity.name.function.lisp'; };
> };
> },
>
> I can understand why it also covers other types of definition ( eg
> (def-new and (define-macro ) although I rarely use these, and
>
> [...] it sort of looks Ok at first glance
Well, try put your regexp in the normal find dialog, click Regular
Expression and do a Next -- for me it only matches the ‘define’
part.
> (I don't know whether some of those parentheses should be escaped...)
All those you want to match literally should be escaped.
> [...] Should I expect this to work as like this or has something
> else gone wrong, or does it rely on other things being set as well?
It does rely on the preference Michael Sheets mentioned, but
entity.name.function should already be set to show in the pop-up.
The problem is with your regexp to match the defines. You can also
use ⌃⇧P to see the scope of the caret when debugging this.
More information about the textmate
mailing list