Visual Assist 2023.6 is here and is available to download! This release is filled to the brim with new functionality that improves upon your staple VA features and a new, convenient way to share source code with colleagues.
We also have a new code checker, support for two new C++ language features, and small but useful improvements to VA’s behavior. Read on further to get the complete details of the changes and improvements in this release, or download the release right away.
Table of Contents
Share source code via email, GitHub, and more.
Starting from VA 2023.6, users can now highlight sections of code from the editor and open the Quick Actions and Refactoring (Shift + Alt + Q) menu, or right-click on the code and select the “Share with team member” option to instantly send code to other developers.
Choose where and how you want to share your code. This new feature can work in conjunction with GitHub Gist and GitLab’s snippets feature, where you can instantly share and upload parts of your source code. You can also send your source code via email for more general-use purposes.
Improvements to VA’s navigation features
This release provides a number of improvements and additional functionality to VA’s bread and butter navigation features, such as open file in solution and find symbol in solution.
- Fuzzy search and uppercase search for opening files and searching symbols
Fuzzy search is a technique used in searches and information retrieval to find approximate matches for a given query, accommodating variations like typos and misspellings. It employs string distance metrics to measure the similarity between strings.
Visual Assist’s open file in solution and find symbol in solution will now employ this algorithm, so you can expect more results with fewer, less accurate search queries.
Furthermore, besides fuzzy searching for inexact matches, VA will also match capital letters. If you have a class named MyClassName, searching for “mcn” would find it. It works similarly if you have a global variable named myGlobalVariable and type “mgv”. It is smart enough to count the lowercase “my” as if it were MyGlobalVariable leading to expected results.
- Select all items in open file in solution (Ctrl + A)
You can now select and highlight multiple files and open them simultaneously when using open file in solution. The usual shortcut Ctrl + A works.
Improved support for Braced Initialization Lists / Uniform initialization (C++ 11)
2023.6 also improves support for braced initialization of lists and/or uniform initialization. Brace initialization lists and uniform initialization provide a more consistent and flexible way to initialize objects in C++.
These features improve code readability and reduce the chances of certain types of errors. Visual Assist’s parser will recognize these lists and highlight and suggest auto corrections within them.
Improved support for constexpr, consteval and constinit (C++ 20)
These features are related to compile-time evaluation and initialization. They have specific use cases and are used to enforce certain behaviors at compile time. If you haven’t been using these, here’s a quick breakdown:
- constexpr used to indicate that a function or variable can be evaluated at compile time.
- consteval a stricter version, ensuring that the function or expression is only evaluated at compile time and cannot be evaluated at runtime.
- constinit is used to indicate that a variable must be initialized at compile time and, once initialized, its value cannot be changed during the program’s lifetime.
When using these features, Visual Assist will recognize what you are trying to accomplish such as refactoring commands mainly. Refactorings such as Create From Usage will now properly handle these keywords.
New code inspection for detecting “magic-numbers”
This new Clang-based code inspection checks for instances of magic numbers—or numeric literals that are used without any definition—that are advised against by many coding guidelines for readability sake.
Enable code inspections by navigating to Extensions ->> VAssistX ->> Code Inspection ->> Enable code inspections. This specific code inspection is disabled by default because some users may be intentionally using it and are not interested in “fixing” it.
Then you can either click on detected issues underlined in blue, use the Quick Refactoring Menu (Shift + Alt + Q) while on the highlighted issue, to allow VA to do it for you. In this case, there is no automatic fix so it will prompt you to define a variable with that number as its value and use the variable instead.
Protip: VA can help do that for you with the introduce variable feature. If you highlight the number, then use the Quick Actions menu and select Introduce Variable it will ask you for a name and pull the number out into a variable for you.
You can read more about the readability-magic-numbers code checker on Clang’s documentation.
New move class feature
You can now move entire classes into different files with the new move class feature included in 2023.6.
For example, if you have a class named MyClass, with its declaration in MyClass.h and its definition in MyClass.cpp, you can move the entire class into a new pair of files, MyClassNew.h and MyClassNew.cpp.
This is useful if you have a header and source file pair (.h and .cpp) that contain multiple classes and you want to break that up into multiple files.
Bug fixes and improvements
For this release, we have a couple of fixes based on user requests. The most notable of these improvements include a fix for file exclusion instructions using .json configs similar to a previous release, a parser improvement for Unreal Engine 5, and improved auto-detect logic for Unity.
- Fixed multiple issues with file exclusion logic when reading from “.vscode\settings.json” configs.
- Our parser now better understands Unreal Engine 5.0 (specifically that build) types, such as FVector.
- Fixed Create from Usage behavior when used inside const inline methods.
- Fixed coloring of [[fallthrough]] marked enum items.
- Attempted to fix rare temporary hang when debugging C# Unity projects.
- Code Inspections options dialog now displays much more quickly.
- Improved Unity engine auto detect logic to reduce false positives.
Thanks to those who submitted their feedback and bug reports. Please continue sending them our way. Send us a message or start a thread on the user forums for bug reports or suggestions.
You can also check our download page to manually update to the latest release. Happy coding!