Haml Pipe Separated Multiline Statement Syntax Highlighting

1.2k Views Asked by At

How do I eradicate this kind of ugliness?

enter image description here

Would be nice to have some syntax highlighting on this stuff.

I thought this Textmate bundle here might do the trick, but no luck. I know it's all to do with the pipe separators for multiline statements.

1

There are 1 best solutions below

2
On

Do you even need those vertical bars in the first place? I have never used them in this way in my Haml files. According to the Haml docs, the pipe character designates a multiline string:

%whoo
  %hoo= h(                       |
    "I think this might get " +  |
    "pretty long so I should " + |
    "probably make it " +        |
    "multiline so it doesn't " + |
    "look awful.")               |
  %p This is short.

So, for what you are doing, just having a comma at the end of the line after one of your arguments should be enough to put the next argument wherever you would like on the next line.