hiya' PROBLEM: I want all my variables to be colored. I'm coding in ASP & there is no $ @ or any easy way to define what variables look like. I can the first word after the work DIM (or comma delimitated list or words) (DIM being the create_a_variable deal in asp) but it only colors that instance of the word.
SOLUTION: I would like textMate to search my page for all words after the word DIM & add them to the bundle as variables, but only for this file. Therefor creating on-the-fly bundles. This could extend out to listing all the varables or functions or whatever with a command or some such thing. Maybe a way to manually select something & define that selection as a scope for this document only, therefore applying that scope to all instances of that text. That would allow for something like a hilight-all-instances-of-the- current-selection command with shortcut. AWESOME!
You could define them either on a page basis or a project basis, or even add it as a permanent change to an existing or new bundle.
oh yeah!
On 17/08/2005, at 23.13, thomas Aylott wrote:
I want all my variables to be colored. I'm coding in ASP & there is no $ @ or any easy way to define what variables look like. [...] SOLUTION: I would like textMate to search my page for all words after the word DIM & add them to the bundle as variables, but only for this file. Therefor creating on-the-fly bundles.
I don't think on-the-fly bundles is the proper solution, but the problem is valid.
There is a desire for letting scopes come from more than just the language grammars, to allow dynamic scopes (like snippet placeholders, current word etc.) and to keep the patterns, which are created for context sensitive behavior, outside the language grammars -- with beta 17's (unreleased as of this writing) ability to perform set operations on scope selectors, this does make a lot of sense. E.g. specify foldings as: "other.folding-keyword - (string | comment)" or let the invalid coloring exclude current word by using: "invalid.illegal - dyn.current-word".
As for marking up variables (w/o special tokens), that sounds like something the (planned) code completion plugin could do -- though in practice, there's just a way to provide extra scopes, and different “modules” contribute (using the same means).
There is however no concrete plans, this is just me thinking out load, and most likely I won't be able to address the issue before 1.3.
On Aug 21, 2005, at 11:06 PM, Allan Odgaard wrote:
allow dynamic scopes (like snippet placeholders, current word etc.) and to keep the patterns, which are created for context sensitive behavior, outside the language grammars -- with beta 17's (unreleased as of this writing) ability to perform set operations on scope selectors, this does make a lot of sense. E.g. specify foldings as: "other.folding-keyword - (string | comment)" or let the invalid coloring exclude current word by using: "invalid.illegal - dyn.current-word"
What all made it into b17? Where do I find info about "beta 17's ... ability to perform set operations on scope selectors"?
On 02/09/2005, at 17.35, thomas Aylott wrote:
Where do I find info about "beta 17's ... ability to perform set operations on scope selectors"?
From the b17 release notes:
[NEW] When providing a scope selector (in Fonts & Colors or the Bundle Editor) it's now possible to or, and, and subtract (asymmetric difference) scope selectors. The operators are |, & and - respectively (listed in order of descending precedence). You can use parenthesis to override the precedence (or make it explicit). For example, to target Ruby strings, except embedded code in these strings, use: “source.ruby string - string source”.