Difference between using tab and enter to accept completion?

[5.1.1707]

If I start with the snippet below:
public class Foo
{
        public void Bar()
        {
            var myString = new System.Text.UTF8Encoding
                (true);
        }
}

When I then remove the "UTF8Encoding" and start typing ".UTF8" again, I get the intellisense listbox. But depending on if I use Enter or Tab I get different result, is this a designed RS behavior?
And it seems that the Tab-case eats the newline I have before the "(true);", but this only happens if I have the opening parentheses on next line, is this by design?

Using Enter:
        {
      var myString = new System.Text.UTF8Encoding({CURSOR})
                (true);
        }
Using Tab:
        {
            var myString = new System.Text.UTF8Encoding({CURSOR}true);
        }
Thanks.

3 comments
Comment actions Permalink

I have been using the TAB feature for a long time. It is great.

0
Comment actions Permalink

Hello,

Regarding your questions:
1. Yes, this behavior is by design.
2. I've raised an issue: http://youtrack.jetbrains.net/issue/RSRP-182497
and you're welcome to monitor its status.

Thank you!

Andrey Serebryansky
Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Using Enter:
{
var myString = new System.Text.UTF8Encoding({CURSOR})
(true);
}
Using Tab:
{
var myString = new System.Text.UTF8Encoding({CURSOR}true);
}



0
Comment actions Permalink

Hello,

In short, Enter tends to complete with minimal overwrite of existing code,
while TAB is aggressive in that (trying to reuse or overwrite existing constructs
to the right of the caret). Sometimes the code to be removed by TAB-completion
is highlighted with some color (ping, maybe).


Serge Baltic
JetBrains, Inc — http://www.jetbrains.com
“Develop with pleasure!”


0

Please sign in to leave a comment.