3

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.

Cœur
  • 37,241
  • 25
  • 195
  • 267
botbot
  • 7,299
  • 14
  • 58
  • 96

1 Answers1

1

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.

Paul Fioravanti
  • 16,423
  • 7
  • 71
  • 122
  • good point. i was getting errors before, i'll have to revisit and see what the error was. thanks. – botbot Jul 01 '12 at 22:45
  • No problem. Did getting rid of the lines end up fixing the errors you were getting, or at least give you the same errors, yet now you have prettier code? :-) – Paul Fioravanti Jul 03 '12 at 17:50