Block / Hotkey Question

Is there a hotkey or command that will convert a 'parenthesis' style block into a 'do/end' style block ??

e.g. to convert from this...

[1,2,3,4].each {|x| puts x}

to this...

[1,2,3,4].each do |x|
  puts x
end

(and vice-versa...)

tx, Andy

1 comment

Hello andy,

Yes. Put the caret on the block and press Alt-Enter to show the intention
actions popup.

Is there a hotkey or command that will convert a 'parenthesis' style
block into a 'do/end' style block ??

e.g. to convert from this...

.each {|x| puts x}

to this...

.each do |x|
puts x
end
(and vice-versa...)

tx, Andy

---
Original message URL:
http://www.jetbrains.net/devnet/message/5263046#5263046

--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.