Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Haml Pipe Separated Multiline Statement Syntax Highlighting

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.

like image 428
botbot Avatar asked Jan 22 '26 13:01

botbot


1 Answers

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.

like image 65
Paul Fioravanti Avatar answered Jan 25 '26 07:01

Paul Fioravanti