Is it true that if I make changes to any of my bundles, they will no longer be updated by TextMate updates? Is it possible to make a separate bundle that just encompases my changes and have them apply to another bundle? If I've missed this in the manual, can you point me at where I can find it?
-dave
On 27. Oct 2006, at 03:44, Dave Grijalva wrote:
Is it true that if I make changes to any of my bundles, they will no longer be updated by TextMate updates?
No
Is it possible to make a separate bundle that just encompases my changes and have them apply to another bundle?
Depends on what exactly you wish to change.
If I've missed this in the manual, can you point me at where I can find it?
http://macromates.com/textmate/manual/ bundles#editing_default_bundles_items
I'm trying to make some changes to the Language without losing the ability to get updates (to the language). I just want to add in a couple extra things. I want to have my documentation a different color from the commented out code. Also, i want to have a (space)* inserted at the beginning of newlines when I'm using the docblock format.
Here's what I've come up with:
I created a new Language under JavaScript with this: { scopeName = 'source.js.dave'; fileTypes = ( 'js' ); foldingStartMarker = '^.*\bfunction\s*(\w+\s*)?([^)]*)(\s*{[^}]*)?\s*$'; foldingStopMarker = '^\s*}'; patterns = ( { name = 'comment.documentation.docblock.js'; begin = '/**'; end = '*/'; captures = { 0 = { name = 'punctuation.definition.comment.js'; }; }; }, { name = 'comment.documentation.line.triple-slash.js'; match = '(///).*$\n?'; captures = { 1 = { name = 'punctuation.definition.comment.js'; }; }; }, { include = 'source.js'; }, ); }
Is there a better way to do this? thanks
-dave
On 10/26/06, Allan Odgaard throw-away-1@macromates.com wrote:
On 27. Oct 2006, at 03:44, Dave Grijalva wrote:
Is it true that if I make changes to any of my bundles, they will no longer be updated by TextMate updates?
No
Is it possible to make a separate bundle that just encompases my changes and have them apply to another bundle?
Depends on what exactly you wish to change.
If I've missed this in the manual, can you point me at where I can find it?
http://macromates.com/textmate/manual/ bundles#editing_default_bundles_items
For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate
I'm trying to make some changes to the Language without losing the ability to get updates (to the language).
As described in the manual, your changes to the default bundles will be saved as a tmDelta (a diff file, basically) in ~/Library/Application\ Support/TextMate/Bundles, and won't affect the ability to update the bundle in future versions.
I want to have my documentation a different color from the commented out code.
Instead of a separate language grammar in the JavaScript bundle, I'd suggest putting the keys inside your pattern block...
{ name = 'comment.documentation.docblock.js'; begin = '/**'; end ='*/'; captures = {0 = {name = 'punctuation.definition.comment.js';};}; }, { name = 'comment.documentation.line.triple-slash.js'; match = '(///).*$\n?'; captures = {1 = {name = 'punctuation.definition.comment.js';};}; }
...inside the actual JavaScript language grammar's main patterns block. You might reconsider the "\n?" at the end of the second match key; I'm fairly certain it's redundant ("$" being the EOL symbol)
I want to have a (space)* inserted at the beginning of newlines when I'm using the docblock format.
This smells like a Snippet (perhaps '**' for the tab trigger, then '*' inside the comment.documentation.docblock.js scope to insert a new line with the space+*)...
HTH, Daniel
On Oct 31, 2006, at 3:08 PM, Daniel Stockman wrote:
I'm trying to make some changes to the Language without losing the ability to get updates (to the language).
As described in the manual, your changes to the default bundles will be saved as a tmDelta (a diff file, basically) in ~/Library/Application\ Support/TextMate/Bundles, and won't affect the ability to update the bundle in future versions.
This works for Snippets and things, but I'm not sure if it works for the Language grammars themselves. I had a similar question in August and Allan said:
As for the delta files: these do not have the granularity of storing only changes to single rules, as that can’t be merged without potential conflicts when the default grammar is updated.
Maybe I'm misunderstanding, but I've taken to trashing my delta for the PHP grammar and re-doing my customizations each time I suspect it might have been updated. Obviously, I would like someone to tell me I'm wrong here. :)
Rob
I have a feeling you're correct, Rob. That's why I've gone with the separate grammar file.
daniel, yes. I have that implemented as a snippet, though I use /** for the tab trigger.
-dave
On 10/31/06, Rob McBroom textmate@skurfer.com wrote:
On Oct 31, 2006, at 3:08 PM, Daniel Stockman wrote:
I'm trying to make some changes to the Language without losing the ability to get updates (to the language).
As described in the manual, your changes to the default bundles will be saved as a tmDelta (a diff file, basically) in ~/Library/Application\ Support/TextMate/Bundles, and won't affect the ability to update the bundle in future versions.
This works for Snippets and things, but I'm not sure if it works for the Language grammars themselves. I had a similar question in August and Allan said:
As for the delta files: these do not have the granularity of storing only changes to single rules, as that can't be merged without potential conflicts when the default grammar is updated.
Maybe I'm misunderstanding, but I've taken to trashing my delta for the PHP grammar and re-doing my customizations each time I suspect it might have been updated. Obviously, I would like someone to tell me I'm wrong here. :)
Rob ______________________________________________________________________ For new threads USE THIS: textmate@lists.macromates.com (threading gets destroyed and the universe will collapse if you don't) http://lists.macromates.com/mailman/listinfo/textmate