sitnikovme
sitnikovme

Reputation: 85

How can I use Rubymine to automatically convert a ruby block from curly braced style to begin..end style and vice versa?

I'm using Rubymine and wondering, how can I convert a block from curly braced notation to begin..end and vice versa?

for example

loop do
end

to

loop {}

Upvotes: 3

Views: 412

Answers (1)

Mark Thomas
Mark Thomas

Reputation: 37517

To toggle between do..end blocks and {``} blocks, place your cursor on the do (or open bracket) and press Alt + Enter. You see the option to toggle.

Upvotes: 8

Related Questions