[TxMt] Matching a file to multiple grammars on TM2?
John Yeates
textmate2 at warmvomit.co.uk
Sun Dec 18 12:59:54 UTC 2011
I've imported the SCSS TM1 bundle (https://github.com/kuroir/SCSS.tmbundle.git) to TM2, and .scss files load correctly as source.scss files. However, I do not have access to the CSS bundle's snippets when editing an SCSS file.
I worked around this on TM1 by adding source.scss as a scope selector for EVERY snippet in the bundle, which took an absolute age — and the multilevel design of the TM2 bundle editor means it's probably going to take even longer!
Adding .scss to the file types for the CSS bundle means I lose the use of the SCSS bundle with these, as .scss files now show up as source.css rather than source.scss. (Incidentally, when I hit the + button under file types, should the cursor not go to the just-added entry so I can start typing the extension? As it stands, TM2 just adds a blank line and it looks like nothing happened…)
What I really want is a way to cascade definitions in the bundle editor — to set up SCSS files in the SCSS bundle so that they get all the benefits of being source.scss AND source.css.
Is this even possible? Hacking the CSS bundle seems like an ugly and labour-intensive way of doing this…
Thanks
--
John Yeates
More information about the textmate
mailing list