slim-template / ruby-slim.tmbundle

A Textmate / Sublime Text bundle for Slim
http://slim-lang.com/
MIT License
185 stars 46 forks source link

Text Highlighting Issue #1

Closed ryanjafari closed 12 years ago

ryanjafari commented 13 years ago

Hi there,

Thanks for the bundle! Wanted to point your attention at this:

http://cl.ly/111Z0u1H0C452f0P3p2R

Seems like the plain text is incorrectly highlighted. We reverted back to the following commit:

https://github.com/fredwu/ruby-slim-tmbundle/commit/4afca0ef0f5f06d7e24ef832d0296d067376f1df

And this issue does not exist (so we are using that commit for now).

Thanks! Ryan

jbescoyez commented 13 years ago

+1 I have exactly the same issue .

ghost commented 13 years ago

Also having this problem. I would like to mention I'm using the .tmLanguage file in Sublime Text 2, not Textmate. It's a stretch but it might be a compatibility issue. I only say this because there have been a lot of commits since the last one that "worked", so I find it somewhat surprising this wasn't caught earlier.

It seems like for example #comment==foo highlights correctly but #comment == foo will be treated as plaintext. I'm looking at the file and it looks to be a lot of regex wrapped up in XML. Shouldn't be too hard to compare what changed from the October commit and make adjustments.

EDIT: Except it is hard. Pretty hard.

First off I can't seem to find any real documentation on how to go about creating a .tmLanguage, so I'm mostly interpreting what I see.

Secondly (and really, I should have figured this) most of the regular expressions are non-trivial or need to be, in terms of capturing just enough as well as handling different use cases. To do this properly there should be a large example slim file that does "everything" allowed by the syntax, so that there's something to reference after making modifications.

I'm gonna fork this and see what I can do. Some of the modifications I made locally ended up being pretty major.

agileapricot commented 12 years ago

It would be great to get highlighting like http://slim-lang.com/ in Sublime Text 2

ghost commented 12 years ago

Sublime Text 2 supports .tmLanguage files just like Textmate.

agileapricot commented 12 years ago

I know i've been using this package in it but the highlighting in not as advanced as on the slim site e.g. doctype and html are different colors.

icetbr commented 12 years ago

Don't know if you saw my pull request, I might have fixed this

https://github.com/fredwu/ruby-slim-tmbundle/pull/3

fredwu commented 12 years ago

Closing this issue per @icetbr's pull request (merged).