Autoformatting and whitespace
What is going on with autoformat eating whitespace more greedily with each release?
The ideal way for me would be like this (Rubymine < 2.0)
create_table :test do |t|
t.integer :foo, :null => false
t.datetime :bar, :null => false
t.string :baz, :null => false, :limit => 32
end
Then in 2.0 or 2.0.1 suddenly this happened:
create_table :test do |t|
t.integer :foo, :null => false
t.datetime :bar, :null => false
t.string :baz, :null => false, :limit => 32
end
And now in 2.0.2 autoformat collapses all white space:
create_table :test do |t|
t.integer :foo, :null => false
t.datetime :bar, :null => false
t.string :baz, :null => false, :limit => 32
end
I like most of my Ruby code formatted with whitespac so it neatly aligns into columns and I also like autoformat, but it's pretty impossible to use after 2.0.2. Can't find any options either how to make autoformat eat a little less whitespace in the middle of the lines
Does anyone know of any option to configure it or would it possible to add one?
请先登录再写评论。
Hello Tarmo,
It seems like it's a RubyMine bug, I've created an issue: http://youtrack.jetbrains.net/issue/RUBY-5715
Feel free to vote, comment and track progress of it.
Regards,
Oleg
Thanks Oleg, hope it will get fixed for next release
Hmmm, latest published RubyMine version is 2.0.1
In my case RM just remove useless whitespace before ":foo", and ":null"
E.g.
1.
will be converted to
2.
to