Inserting a Line Above the Current Line

In build 856, it seems that you can do this with Ctrl-Shift-Enter only if the cursor is positioned before the first character on the line.  For example,

def foo
end

If the cursor is positioned before the "e" in end, Ctrl-Shift-Enter opens a line above "end" and inserts 2 spaces.  If the cursor is positioned anywhere else on the line, however, a line is added below the current line.  Is there another way to insert a line above the current one?

1 comment
Comment actions Permalink

gardnercr wrote:

In build 856, it seems that you can do this with Ctrl-Shift-Enter only if the cursor is positioned before the first character on the line.  For example,

Ctrl+Shift+Enter - is "Complete current statement" action and it doesn't designed to for inserting a line above current line. E.g. in Ruby code:

#before
def fo<caret>o

#after
def foo
   <caret>
end


Or in RHTML code:

#before
<% if con<caret>dition %>

# after
<% if condition %>
    <caret>   
<% end %>

We don't have special action for inserting a line above. I've filled a feature request - http://www.jetbrains.net/jira/browse/RUBY-3862. Feel free to comment and vote for the issue.

0

Please sign in to leave a comment.