user3670011
user3670011

Reputation: 194

Visual Studio: complete word hotkey not consistent

I start typing a name of an enumerator class and VS suggests a word.

i imgur com/2s5P69g png

I've googled and tried all the hotkeys (Alt+Left, Ctrl+Space, Ctrl+K, Ctrl+W, W, Enter) but none of them complete the word. I swallow my pride and painfully double click the correct option with my mouse pointer.

i imgur com/tQQkmdR png

I continue selecting the desired value from the enum and again VS suggests exactly the one I want and this time it allows me to press enter to autocomplete the word. Hurray!

The question is why is this behavior not consistent? What hotkey completes the word in the first case? It's just plain stupid I have to mess up the code with an extra enter every now and then just because it doesn't want to complete it.

Upvotes: 1

Views: 1101

Answers (2)

JayByte
JayByte

Reputation: 74

When the line is outlined, you can only select it with Tab. This is usually a "best guess" from IntelliSense and doesn't necessarily match what you have typed (mismatched capitals for example).

When the line is filled, you can use Tab, Enter or a trigger character, like period (.), to select it.

Personally I use Tab most of the time but also try to use trigger characters when appropriate.

Upvotes: 1

Imran Sh
Imran Sh

Reputation: 1774

To select correct answer (Class,Variable,Enum,Struct and etc) in Visual Studio intellisense you need to type your word and when you see the word at first of suggested list in intellisense, press enter key on keyboard so you don't need to use mouse.

Also I found it useful:

https://msdn.microsoft.com/en-us/library/hcw1s69b.aspx

UPDATE: In last version of Visual Studio we have new feature that called Complete Word

Complete Word completes the rest of a variable, command, or function name once you have entered enough characters to disambiguate the term. You can invoke Complete Word by clicking Word, typing CTRL+SPACE.

Upvotes: 0

Related Questions