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.
3 Comments - Add comment