ReSharper 6.1: Improvements in IntelliSense Options
This post is about ReSharper 6.1. For other features in ReSharper 6 (both 6.0 and 6.1), please see previous posts introducing ReSharper 6:
- CSS Support in ReSharper 6
- ReSharper 6 Bundles Decompiler, Free Standalone Tool to Follow
- ReSharper 6 Enhances Suggestions with Explanations
- ReSharper 6 Enhances Razor Support
- File Header Macros in ReSharper 6
- ReSharper 6.1 EAP Opens: Much More than a Bugfix Release
- ReSharper Settings in 6.1
- Async CTP Support in ReSharper 6.1
- ReSharper 6.1 Settings: DropBox and Company-wide
ReSharper 6.1 introduces more fine-grained control over Intellisense.
As shown in the screenshot, in addition to the two older options (enhancing Visual Studio’s Intellisense with ReSharper or leaving as is) we can now select which technologies to apply Intellisense to. It is important to note that by de-selecting a technology, we do not switch off Visual Studio Intellisense for that technology, but only eliminate ReSharper’s enhancements of it.
Defining Autopopup behavior
The way Intellisense works inside Visual Studio, including ReSharper’s, is that matching elements appear as you type, allowing you to select the option by hitting Tab or Enter
This default behavior can be very productive, but it can also prove somewhat annoying, specially when we’re doing things like Test Driven Development or any kind of Create from usage scenario. For instance, we are trying to write a class or method that does not exist. We write it out and hit Enter, Intellisense completes it with the nearest match
In order to avoid these situations, we have added a new feature to ReSharper 6.1 which allows us to control not only where we want Intellisense to appear, but also how. That is, in addition to selecting the technology such as HTML, C# or XAML, we can now fine-tune Intellisense in each of these. Under ReSharper | Options | Intellisense | Autopopup we have the following screen
Much like the Code Inspections, it is divided into different tabs based on the technology and an All tab that displays all entries. If we look through the list, we can see that under C#, we have several options, one of them being
By default, all entries have the value “Display and preselect” which results in the behavior shown in the previous video. We can however change this with two other options
Do not display which will completely disable Intellisense
Display but do not preselect which will display matching values but will not preselect it.
This latter option is what we need in our case. We’d like to know of existing elements, but not necessarily have them completed when hitting Enter or Tab, etc. The video below displays this new behavior
Same as we have done with the After ‘new’, we can do with many others.We have tried to think of the most common scenarios where one would like to control this behavior. Please let us know if you feel something is missing. Hopefully however, this makes working with Intellisense productive and often less intrusive.
Subscribe to Blog updates
Thanks, we've got you!