简体   繁体   中英

Visual Studio: complete word hotkey not consistent

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

我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.

我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.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM