When you purchase through links on our site, we may earn an affiliate commission. Here’s how it works.

Microsoft brings AI-powered rename suggestions to Visual Studio Preview

Smart renaming with GItHub Copilot

Users of Visual Studio Preview that use the paid GitHub Copilot Chat extension can now use AI to suggest names for variables, methods, and classes. Rather than just suggesting a name, Microsoft said the extension looks at how your identifier is used and your code style to “propose identifiers that seamlessly fit your codebase”.

Naming various parts of your code is vital so that when you come back to it in the future you know what that code does. It’s also helpful if you are working in a team, other team members will be able to better understand what’s going on.

To use the new tool, you just select an identifier and right-click. From there, you press Rename and you’ll be shown a list of suggestions tailored to your code. Once you’ve found a suggestion you like, just press Enter.

You’ll need to be a GitHub Copilot subscriber. For individual users, this costs $10 per month or $100 per year, for Copilot Business it costs $19 per user per month, and for Copilot Enterprise it costs $39 per user per month.

To start using this feature, ensure that you have a GitHub Copilot subscription and the latest Visual Studio Preview installed and update the GitHub Copilot Chat extension if it is already installed.

Next, you need to go to Options > GitHub > Copilot chat > and check the “Enable rename suggestions” option. The company said that it wants to hear feedback about how this feature impacts your coding workflow.

The ability to get good names for variables, methods, and classes is just the latest way that AI is helping coders to write better code. While the AI cannot really be used to develop the software independently, it is helpful as an assistant.

GitHub Copilot is also interesting as a product as it’s one of the earliest generative AI applications that makes financial sense. As time goes on, we will probably see tech firms find other ways to commercialize generative AI tools.

Report a problem with article
The TCL Q6
Next Article

Get the TCL Q6 QLED 4K smart TV for less than $450 [Update]

The TikTok app on a phone
Previous Article

TikTok gets optimized for larger screens and foldable devices

Join the conversation!

Login or Sign Up to read and post a comment.

3 Comments - Add comment