<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"></blockquote>
Yes, write a regular script that reads a CSS file (preferably from stdin) <br></blockquote><div><br></div><div>Thanks Allan, this is a lot clearer now.</div><div>Just a couple more questions..</div><div><br></div><div>Would you expect it to be pure shell/bashscript, or could I use node/php etc?</div><div>I know some bundles use ruby or node, but with CSS being a core bundle I'm not sure if you try to reduce runtime dependencies?</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
So it should track the line number and could also track the column number, but for now, the result will be the same (since we add to the gutter rather than inlined).</blockquote><div><br></div><div>Ok, I will output column offset anyway, and then TM can just ignore it</div><div><br></div><div>What are your thoughts when a line has more than one color.... border-color: #F00 #0F0 #00F #FF0;</div><div><br></div><div>I could either just output the first color and discard the rest</div><div>Or I could output them all, in reverse order (maybe for future use somehow?)</div><div>This would mean they are all included, but the first color ends up overwriting the latter ones in the gutter.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
It needs to be written to disk, I suggest using a location like `~/Library/Caches/com.macromates.textmate.colors/` and then you can also skip generating an image if the file already exist.<br></blockquote><div><br></div><div>Safe to just hardcode this path relative to ~/ ? </div><div>Or should I be basing it on some $TM_ENV_VAR ?</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
I think one solution could be that if the path supplied to `--clear-mark` ends with a slash, it will clear all marks which are descendents of that path, so that the script only need to make one call to `--clear-mark` rather than one per image it has previously set/generated.<div class=""><div class="h5"><br></div></div></blockquote><div><br></div><div>This seems like a good solution. </div><div>Should I namespace my 'colors' dir to include a bundle name subdir?</div><div><br></div><div>~/Library/Caches/com.macromates.textmate.colors/css/*.eps<br></div><div><br></div><div>Im thinking if another bundle was ever to use this gutter color api, my bundle can call </div><div><br></div><div>--clear-mark ~/Library/Caches/com.macromates.textmate.colors/css/ </div><div><br></div><div>and it would avoid clearing any color marks other bundles might have set? </div><div>Not sure, perhaps I'm overthinking it :-)</div><div><br></div><div>Thanks</div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">
<br>
_______________________________________________<br>
textmate mailing list<br>
<a href="mailto:textmate@lists.macromates.com" target="_blank">textmate@lists.macromates.com</a><br>
<a href="http://lists.macromates.com/listinfo/textmate" rel="noreferrer" target="_blank">http://lists.macromates.com/listinfo/textmate</a></div></div></blockquote></div><br></div></div>