ReSharper in Detail: Code Completion in ReSharper 4.0

Jura Gorohovsky

ReSharper extends Visual Studio’s native IntelliSense with a set of three Code Completion features to make it more convenient and adaptable.
ReSharper’s Code Completion is a natural candidate for in-detail review. However, a full-fledged description is out of agenda, because Ilya Ryzhenkov’s Code Completion with ReSharper says it all. Or does it?
While his post is comprehensive, it was written back when R# 3.0 EAP was far from being complete. That said, a number of corrections and additions are due to be announced as of late R# 4.0 EAP.

  • There are still three Completion features, but what was previously known as Basic Completion is now called Symbol Completion, while Type Name Completion was renamed to Import Symbol Completion.
  • In ReSharper 4.0, all three completion features support CamelHumps – for example, you can complete a long type name by entering only its uppercase characters (can you say “DecoderReplacementFallbackBuffer”? forget it – just type DRFB instead)
    To make sure it works, clear the Case-sensitive prefix matching check box in Resharper | Options | Environment | IntelliSense | Completion Behavior. Note that the Use CamelHumps check box in ReSharper | Options | Environment | Editor doesn’t have any impact on how CamelHumps works in completion.
  • Needless to say, Code Completion as of R# 4.0 supports C# 3.0 features, including:
    • Extension methods. Both Smart Completion and Symbol Completion are enabled to suggest extension methods. Import Symbol Completion works after dot for extension methods and inserts required using directives:
    • Object and collection initializers. Smart Completion in initializers displays available properties/fields to initialize:
    • Lambdas. Smart Completion generates lambda-expression syntax as an alternative for anonymous and named methods:
  • Complete Statement. Complete Statement is a feature that inserts necessary syntax elements with a simple shortcut – Ctrl+Shift+Enter. It comes to the rescue in numerous situations, including auto-closing parentheses, adding semicolons, completing if, while and for statements, declaring classes, methods, and structs, and so on:
  • There are also some minor changes and fixes, including completion for boolean fields in XAML files, auto-inserting closing single quotes in XML attributes, and so forth.

Additional references

Comments below can no longer be edited.

3 Responses to ReSharper in Detail: Code Completion in ReSharper 4.0

  1. Tom says:

    May 5, 2008

    So when’s it going to be released?

  2. Jura Gorohovsky says:

    May 5, 2008


    We’re planning to release beta in about a week, and then… then we’ll see how it goes 🙂

  3. JetBrains .NET Tools Blog » Blog Archive » ReSharper in Detail: Complete Statement Scenarios says:

    July 10, 2011

    […] you might already know, Complete Statement (Ctrl+Shift+Enter) is one of major enhancements in Code Completion brought by ReSharper 4.0. This feature inserts necessary syntax elements to complete the current […]


Subscribe to .NET Tools updates