Paul Carey
Paul Carey

Reputation: 566

Line up rspec lets when formatting code in Rubymine

Rubymine generally formats code very well, one thing I cannot seem to get it to do though is to line up my lets in my RSpec specs.

Given unformatted code like this:

let(:foo) { :bar }
let(:another_foo) { :foo_two }

I would like the reformat code feature in Rubymine to line up the let values:

let(:foo)         { :bar }
let(:another_foo) { :foo_two }

Any suggestions (even outside of Rubymine) on how to achieve this would be greatly appreciated.

Upvotes: 0

Views: 190

Answers (1)

hahcho
hahcho

Reputation: 1409

You can install the AlignTab sublime bundle and try using it. It basically gives you the ability to align by special symbol in your case you can mark the let definitions you are interested in and align by {. I am not using RubyMine but I think it has a Textmate bundles support. Try using Tabular for Textmate if this does not work.

Upvotes: 2

Related Questions