Indenting does not always work correctly in HAML files.
If you hit enter at the end of a line while editing a HAML file, it does not always indent the next line properly depending on the type of line you have just entered.
Example:
.flow-field
= f.label :date, 'Quote Date'
%br/
= f.text_field :date
If the line you are editing is one of the following, and it does does not include a Ruby code element like (-) or (=):
only a class specifier (.)
only an id specifier (#)
only an element tag (%)
or literal text
(i.e. .flow-label or #main or %br/, or %ul ir %li)
then when you hit enter at the end of the line, the next line is not indented at all; it is positioned at the very beginning of the line, rather than indented to the level that it should be.
It does indent the next line properly if the line contains Ruby code like (-) or (=).
For insance:
%li = msg
indents the next line properly when you hit enter at the end of the line.
But,
%li this is a test
does not indent the next line properly (it goes all the back to the binning of the line)
(I am using RubyMine 3.0 RC)
请先登录再写评论。
Here is the corresponding issue: http://youtrack.jetbrains.net/issue/RUBY-7162
Let us move further discussion to the youtrack issue.