Yes, write a regular script that reads a CSS file
(preferably from stdin)
Thanks Allan, this is a lot clearer now.
Just a couple more questions..
Would you expect it to be pure shell/bashscript, or could I use node/php
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?
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
Ok, I will output column offset anyway, and then TM can just ignore it
What are your thoughts when a line has more than one color....
border-color: #F00 #0F0 #00F #FF0;
I could either just output the first color and discard the rest
Or I could output them all, in reverse order (maybe for future use somehow?)
This would mean they are all included, but the first color ends up
overwriting the latter ones in the gutter.
It needs to be written to disk, I suggest using a
`~/Library/Caches/com.macromates.textmate.colors/` and then you can also
skip generating an image if the file already exist.
Safe to just hardcode this path relative to ~/ ?
Or should I be basing it on some $TM_ENV_VAR ?
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.
This seems like a good solution.
Should I namespace my 'colors' dir to include a bundle name subdir?
Im thinking if another bundle was ever to use this gutter color api, my
bundle can call
and it would avoid clearing any color marks other bundles might have set?
Not sure, perhaps I'm overthinking it :-)
textmate mailing list