HAML - 2

I just converted one of my projects from ERB to HAML using Rubymine and am impressed with its HAML support.  Good job!
I just do not know what HAML specific functionality is available, in other words, I would like to get my hands on one page cheat-sheet that shows me how to leverage the HAML support to its fullest.  There are a few suggestions that I already have such as auto-indenting when you start an if for an iteration etc.  These kinds of programmer friendly features are the hallmarks of Rubymine and I am sure I just don't know enough about the built-in HAML support.  So would it be asking too much if you folks can put together a cheat-sheet and post it on the forum?
Thanks.
Bharat

5 comments

Hi Bharat,

I just converted one of my projects from ERB to HAML using Rubymine and am impressed with its HAML support.  Good job!
I just do not know what HAML specific functionality is available, in other words, I would like to get my hands on one page cheat-sheet that shows me how to leverage the HAML support to its fullest.  There are a few suggestions that I already have such as auto-indenting when you start an if for an iteration etc.  These kinds of programmer friendly features are the hallmarks of Rubymine and I am sure I just don't know enough about the built-in HAML support.  So would it be asking too much if you folks can put together a cheat-sheet and post it on the forum?

Thanks for the warm words about HAML support!
The easiest way to find out what is already supported or planned for HAML is looking for HAML in our issue tracker http://youtrack.jetbrains.net/issues/RUBY?q=HAML
Feel free to vote and comment any of them.

In a couple of words RubyMine supports

  • HAML syntax based on indentation
  • Ruby code injections inside HAML with full codeinsight support(inspections, resolve, find usages, refactorings, etc)
  • plain and ruby filters
  • i18n intentions to internalize strings in HAML view as well as plain Ruby strings


Regards,
Oleg

0

Thanks Oleg.  I am trying to read the HAML issues list and will try to extract a cheat-sheet from it.  Question for you:  When I see an issue with a strike-through, i.e. a line going through it, does it mean that it has been solved?  In other words, I just don't know how to read the issues list .  Also, you say Plain and Ruby filters?  I don't follow.  Can you give a small example?
Bharat

0

I've been converting my snippets from erb to haml but haven't been able to figure out how to add a haml context so my snippets will be filtered when on *.haml files.

Is there a way around this until you add haml as a context in the future?

0

Hi Bharat,

Thanks Oleg.  I am trying to read the HAML issues list and will try to extract a cheat-sheet from it.  Question for you:  When I see an issue with a strike-through, i.e. a line going through it, does it mean that it has been solved?  In other words, I just don't know how to read the issues list :).  Also, you say Plain and Ruby filters?  I don't follow.  Can you give a small example?

Yep, crossed issues mean closed issues.
Here are small examples on ruby filter:

%div

     :ruby

          1.upto(10) do |n|

               puts "Number #{n}"

          end
We have requests on :javascript filter support as well, but it is not implemented yet.

Regards,
Oleg

0

Hello David,

You can set "Other" context. Haml context will be added in RM 2.0.2

0

Please sign in to leave a comment.