dotnet / roslyn

The Roslyn .NET compiler provides C# and Visual Basic languages with rich code analysis APIs.
https://docs.microsoft.com/dotnet/csharp/roslyn-sdk/
MIT License
19.04k stars 4.03k forks source link

Change in behavior in code snippet shortcuts #67741

Open vsfeedback opened 1 year ago

vsfeedback commented 1 year ago

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:17.4.4] In previous versions, you could type "prop", then press TAB key twice to create code for a property. In the generated code, the text "int" would highlighted.

In the new version, a single TAB creates code for a property. As a result, for those used to pressing TAB key twice, the selected text is now "MyProperty".

The new behavior should be changed back to the old behavior or there should be a setting to choose between the two behaviors.


Original Comments

Feedback Bot on 3/14/2023, 07:41 PM:

(private comment, text removed)

Alisa Qu [MSFT] on 3/15/2023, 03:46 AM:

(private comment, text removed)

valexander on 3/15/2023, 00:25 PM:

(private comment, text removed)

Feedback Bot on 3/16/2023, 01:36 AM:

(private comment, text removed)

Feedback Bot on 4/3/2023, 11:47 AM:

(private comment, text removed)

Feedback Bot on 4/3/2023, 11:49 AM:

(private comment, text removed)


Original Solutions

Ankita Khera [MSFT] solved on 4/5/2023, 04:05 PM, 0 votes:

This is the new behavior with semantic snippets.

Semantic snippets can be turned off by going to
Tools -> Options -> Text Editor -> C# -> IntelliSense
and turning off the option “Show new snippet experience (experimental)”

akhera99 commented 1 year ago

This isn't a bug, just the new behavior with semantic snippets.