Auto adding "end" after "if". What is it? How turn this feature off?

When I type in .rb file: "if" and press "space" I get code in 3 lines:
if |

end


But I don't need this stuff. I just want make one-line code:  a = 1 if b ==0
WTF going up with my favourite IDE?
How turn off this unwanted feature? I'm not know how it named.

2 comments
Comment actions Permalink

Hi,

it looks like RubyMine autocompletes "if" as "if" live template.  Mostlikely it is the same problem as described in http://youtrack.jetbrains.com/issue/RUBY-14326
Try the workaround the ticket has and if it does help vote for the ticket (so we would know that we need to change defaults)

Regards, Oleg.

0
Comment actions Permalink

http://youtrack.jetbrains.com/issue/RUBY-14326 also very dissapointed (I voted), but not about my problem.

You right, it was Live templates with 'by default expand with: spaces', I changed to 'tab' and all become normal:
live_templates.png

----
But it was terrible.
Imagine ready codestep1.png just press space after 'if' and step2.png all blowing up without any reason.

I'm very happy, that found how change this behaviour.

0

Please sign in to leave a comment.