Smart Code Completion - Ctrl-Shift-Enter

Sorry if this has been answered but I get a lot of results in the search dealing with Smart Completion.

Is there a way I can get the following behavior:

When I hit Ctrl-Shift-Enter and there is code/comment on the following line can the cursor be put at the end of the current line?

For example if my cursor is at the end of the param blah and I hit ctrl-shift-enter:

Foo(blah<cursor here>
SomeOtherMethodCall();

I want this:
Foo(blah);<cursor here>
SomeOtherMethodCall();

Normally I get:
Foo(blah);
<cursor here>
SomeOtherMethodCall();

and I have to delete the new line. I'm constantly running into this. The feature works great with code blocks but adding method calls into the middle of code always generates spurious new lines.

Actually I want this behavior if there is any code following, especially in scope of a block. If I already have a line between method calls I don't need another one. Example:

Foo(blah<cursor here>

SomeOtherMethodCall();

Becomes:

Foo(blah);
<cursor here>
<extra line>
SomeOtherMethodCall();

Thanks

2 comments
Comment actions Permalink

There is an issue (7 months old) requesting for this functionality/feature: http://youtrack.jetbrains.net/issue/RSRP-128072
You might want to put in a vote for it .

0
Comment actions Permalink

Done, though it only has two votes.

BTW this is how a competitor's product works.

Actually I checked the 'More like this' links and it seems even JetBrains wanted the behavior we're after. In 2003. Another edit: Reading the threads from 2003 it appears Ctrl-Shift-Enter once behaved as we've requested.

0

Please sign in to leave a comment.