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
18.73k stars 3.99k forks source link

Enhance rename functionality, renaming related items #22375

Open BretJohnson opened 6 years ago

BretJohnson commented 6 years ago

Version Used: VS 2017 15.4 P2

Steps to Reproduce:

  1. Rename a class or other type

Expected Behavior: I'd love to see VS behave more like ReSharper, where renaming a type also:

Actual Behavior:

This is probably the ReSharper feature I miss most when using Visual Studio without it. It's one the reasons I continue to use ReSharper.

jcouv commented 6 years ago

FYI @kuhlenh @Pilchie

kuhlenh commented 6 years ago

We currently allow you to "sync type and file name" as a separate quick action (via Ctrl+.). I agree this is a case where we can start to couple code actions together.

The rename for related symbols is interesting...I've only heard one other person mention it before. I can definitely see how this would be a huge productivity booster (especially now that we have smart variable naming based off type names).

kuhlenh commented 6 years ago

@Pilchie @dpoeschl Just heard a couple customers mention this feature request at MSIgnite last week too.

jnm2 commented 6 years ago

Came here to file another of my unfiled coming-from-ReSharper items. Good stuff. It's common for me to improve the type name soon after starting to write a new file, so I look for this a lot.