Mohammad Komaei
Mohammad Komaei

Reputation: 9656

Visual Studio Community 2022 inline hints shortcut

What is the inline hints on/off shortcut in visual studio 2022?

I checked these checkboxes and it works but the shortcut Alt+F1 not work. (Visual Studio Community 2022 (64-bit) - Preview Version 17.2.0 Preview 2.1) enter image description here

Upvotes: 5

Views: 6604

Answers (3)

Mohammad Komaei
Mohammad Komaei

Reputation: 9656

For temporary : Press and hold Alt+F1 for some seconds.

For permanently : select the checkboxes you want in TextEditor > C# > Advancded > InlineHints

Upvotes: 2

Adam Kuzański
Adam Kuzański

Reputation: 684

On vanilla Visual Studio 2022 press ctrl twice.

If you are using Visual Assist press Alt + F1

Upvotes: -1

Rich K
Rich K

Reputation: 410

I found your question because I was having the same issue. I think I've figured out what's going on.

Are you coding in C# or C/C++ ?

If you're doing C#, HOLDING DOWN the alt-F1 keys will TEMPORARILY show ALL the types of hints available; i.e. those you haven't told it to show all the time. When you release alt-F1 the 'extra' hints will disappear. If, as in your image, you've chosen to show almost everything all the time, holding down alt-F1 probably won't display anything different. (try diabling some of the stuff below the first line and see if there's a difference when you hold down alt-F1)

On my system it reacts rather slowly; if you just tap quickly you might not see any change.

(if that doesn't work, you might want to check to see if any extensions you're using are overriding the alt-F1 shortcut)

If you're using C/C++ the inline hints works a bit differently. Here alt-F1 or ctrl-ctrl can TOGGLE hints.

The options settings for C/C++ are located in "Text Editor/ C/C++ / IntelliSense", and the list of inline hint settings are quite a bit more limited than those listed for C#.

Upvotes: 5

Related Questions