VS2015 Preview: Inline Rename

Another IDE experience that has been revamped in Visual Studio 2015 Preview is that of renaming stuff. You can rename a variable by right-clicking it and selecting “Rename…” from the context menu, or instead by simply hitting F2 on your keyboard:

vs2015-inline-rename-menu

When you do this, Visual Studio goes into Inline Rename mode. It finds all the instances of that variable and highlights them for you, while providing some other options on the side:

vs2015-inline-rename-renaming

As you type a new name, all instances are instantly updated:

vs2015-inline-rename-renamed

What’s really cool about this is that the IDE actually warns you if the new name conflicts with some other variable:

vs2015-inline-rename-conflict

Just press Enter to accept the changes.

Although I have demonstrated how to rename a variable, this also works for other things such as methods and classes. In case of conflicts, Inline Rename will attempt to resolve them using fully-qualified names if possible, as demonstrated in the video with Beth Massi and Dustin Campbell.

Leave a Reply

Your email address will not be published. Required fields are marked *