How do I stop auto-complete from replacing lambda parameter names?

During typing a lambda expression to pass to a method, if the has parenthese then when I type the closing ")" ReSharper will change what I've typed into something else. I still want the auto-complete most of the time, but in this specific case it's very annoying. Is there a setting I can change to stop this from happening?

As an example, If I have this:

static void Main(string[] args)
        {
            var d = new ConcurrentDictionary<int, int>();
            d.AddOrUpdate(1, key => 2, (key, value
        }

with the currsor sitting at the end of the word 'value' - which is the name I want for that paramter. When I type ")" ReSharper will change 'value' to 'ValueType', which is not what I want.

I tend to use lambdas quite a lot, so this is very annoying.

2 comments

Hi

I have this issue too. For mewhen I type the name of the parameter intellisense opens and often some typenames are selected and after pressing ) they are inserted.
The only choice here is to use the ESC key to cancel intellisense.

Best regards,
Sven

0

Hello Lee,

When you type ')' ReSharper completes the currently selected item in the
code completion list. In order to avoid this behavior just press Esc to hide
the completion list before typing ')'. Thank you!

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

During typing a lambda expression to pass to a method, if the has
parenthese then when I type the closing ")" ReSharper will change what
I've typed into something else. I still want the auto-complete most of
the time, but in this specific case it's very annoying. Is there a
setting I can change to stop this from happening?

As an example, If I have this:

static void Main(string[] args)
{
var d = new ConcurrentDictionary<int, int>();
d.AddOrUpdate(1, key => 2, (key, value
}
with the currsor sitting at the end of the word 'value' - which is the
name I want for that paramter. When I type ")" ReSharper will change
'value' to 'ValueType', which is not what I want.

I tend to use lambdas quite a lot, so this is very annoying.

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



0

Please sign in to leave a comment.