views:

507

answers:

3

I have been trying out the CTP Beta 1 of Visual Studio 2010 and I hate that VS10 doesn't autocomplete the best match when i press 'enter', or '.'. Visual Studio 2008 did this, and I haven't been able to find any options for this under Tools -> Options -> Text Editor. It kinda breaks my flow each time when I press enter (and get a new line), and I never really seem to get used to it. It's not too great having to press up, then down, then enter, to autocomplete the suggested member name. Also if there is any shortcut to autocomplete the (not selected) keyword, I'd be happy with that too.

+1  A: 

I am pretty sure I use tab?

IPX Ares
Thanks for the tab hint. I just wish I could find a way to get it back the way it was.
Statement
+4  A: 

VS10 has two modes of intellisense, one works like the old but the other searches not only from the beginning of the word but everywhere in it. If you have the second mode you won't be able to complete the word with enter.

I can't remember how to switch between them though but might be a little help.

+1, Good to know
JoshJordan
I fail to find any such switch. Those who upvote, please help clarify how I can switch to the old mode?
Statement
+7  A: 

As aaaaaa said, there are two modes of IntelliSense in Visual Studio 2010.

The one you are used to is called stardard mode and it works similarly(1) as in previous versions.

The new mode is called consume-first mode and is intended to ease life for those who code using types and members before they're defined. TDD practicioners use that a lot.

In Beta 1, you can toggle between the two modes pressing CTRL+ALT+SPACEBAR.

You can find more information about these changes at:

(1) When I stated above that it works similarly, that because in addition to working as it did before, there's an enhanced searching algorithim that can ease the finding of the member you want.

Let's say you want to print a line to the console. You would use:


Console.WriteLine("....");

When typing that you could do any of the following:

  • Type Console.WriteL and press Enter (2)
  • Console.WL and press down arrow key to the WriteLine member and then press Enter (2)
  • Console.line and press the down arrow key to the WriteLine member and then press Enter (2)

(2) You can press Enter or any of the characters define in Tools -> Options -> Text Editor -> C# -> IntelliSense

Alfred Myers
Thanks for posting this. I hit Control-Alt-Space a few times but couldn't tell what the supposed difference was. Unfortunately VS 2010 Beta 1 doesn't have a clear indicator of what exactly gets toggled, and to what state, when you use that key combination.
Kyralessa