IntelliSense is one of the most commonly used features in Visual Studio. With it, developers can write code more efficiently and learn more about their codebase at the same time. In a sense, IntelliSense is both a guide and a productivity feature. We understand the importance of having a powerful IntelliSense system which displays highly relevant results right when they are needed and which minimizes the time you need to spend thinking or typing as a developer. We have been collecting your feedback for C++ IntelliSense and are happy to announce two major improvements in Visual Studio 2017 RC: Predictive IntelliSense and IntelliSense Filtering.
Predictive IntelliSense uses contextual awareness to limit the number of results displayed in the IntelliSense dropdown list. Many of you have pointed out that the dropdown list can get quite long, necessitating a lot of scrolling. With Predictive IntelliSense, we employ type matching to give you results that match the expected type that you will usually need. In the simplest case, if you type int x = and invoke the IntelliSense dropdown, rather than seeing a giant list of all possible results, you will see only integers or functions returning integers. Predictive IntelliSense also excludes several different kinds of results in other cases where Visual Studio expects those kinds aren’t relevant. The result is a far more concise list. This feature is currently experimental and is turned off by default, but you can turn it on by going to Tools > Options > Text Editor > C/C++ > Experimental > Enable Predictive IntelliSense.
Of course, we understand that sometimes, Predictive IntelliSense might not work out and you might need to go back to the longer list. We always had a hidden keyboard shortcut built into Visual C++ which expands the list of IntelliSense results. By default, that shortcut is Ctrl + J. Ctrl + J was used in the past to do things like removing the accessibility filter, which hid private and protected members in Member List results. Now, if Predictive IntelliSense is on, invoking Ctrl + J removes the Predictive filter, going back to the list you are accustomed to from earlier releases. Pressing Ctrl + J again removes the accessibility filter from Member List results where relevant. We have also added a button ([+]) under the IntelliSense dropdown list which does the same thing as Ctrl + J. Hovering over the button gives you some useful tooltip information about what is being shown.
If you check the screenshot above, you will notice there are even more buttons under the dropdown list however. That is because we also added a set of IntelliSense Filters for different kinds of results which you can toggle based on your needs to narrow down the list:
- Variables and Constants
We only list the filter buttons relevant to your current IntelliSense session so you often won’t see all the buttons at once.
Send us your feedback!
We thrive on your feedback. Use the report a problem feature in the IDE to share feedback on Visual Studio and check out the developer community portal view. If you are not using the Visual Studio IDE, report issues using the Connect Form for reporting issues. Share your product improvement suggestions on UserVoice.