Movatterモバイル変換


[0]ホーム

URL:


ReSharper 2025.1 Help

Code completion (IntelliSense)

ReSharper complements and extends Visual Studio's native code completion (IntelliSense) with more advanced capabilities. For example, it narrows down the list of suggestions based on your typing, automatically imports selected types and extension methods, adds parentheses when completing method names, suggests variable and field names depending on their types, and more.

To get you familiar with ReSharper's code completion features, here are some implementation basics:

  • By default, ReSharper replaces Visual Studio's native's IntelliSense with its own features.

    The suggestion list ofAutomatic completion appears as soon as you start typing a new identifier. The suggestion list ofBasic completion appears when you press the default Visual Studio IntelliSense shortcutControl+Space.

    If necessary, you can always return to the Visual Studio's native's IntelliSense. To do so, selectVisual Studio on theEnvironment | IntelliSense | General page of ReSharper optionsAlt+R, O.

  • Two other completion commands,Smart completionControl+Shift+Space andImport Symbol CompletionControl+Alt+Space, which are available always, independently of the selected option for standard completion commands, apply advanced algorithms to add more items to the suggestion list.

  • If you have enabledAI Assistant, you can leverage theAI-powered code completion that can create entire code blocks based on the surrounding context.

  • All of ReSharper's completion shortcuts can be pressed several times in succession. In this case, ReSharper adds even more suggestions to the completion list. For more information, refer toDouble Completion.

  • By default, all ReSharper's completion features supportCamelHumps, that is you can type the initial letters of compound name parts and the name will appear in the list of suggestions.

    If necessary, you can disable CamelHumps by clearing theMatch middle of identifiers checkbox on theEnvironment | IntelliSense | Completion Behavior page of ReSharper optionsAlt+R, O.

  • When you use code completion over existing code items, you can eitherinsert the selected completion suggestion before the existing item by pressingEnter orreplace the existing identifier with the selected suggestion by pressingTab. If necessary, you can change the default shortcuts on theEnvironment | IntelliSense | Completion Characters page of ReSharper optionsAlt+R, O.

  • You may want some types or namespaces not to be suggested, for example, if you have something similar to a system type in your solution, sayMyFramework.MyCollections.List, but you are not actually using it. To exclude such items from the suggestions, add them to theExclude from import and completion list on theCode Editing | Type Import page of ReSharper optionsAlt+R, O.

    The format of the entries isFully.Qualified.Name,Fully.Qualified.Name.Prefix*, or*Fully.Qualified.Name.Suffix. Generic types are specified asList`1.

  • When you select items in completion lists using keyboard, the selection will jump to the first item after the last item and vice versa. You can disable this behavior by clearingLoop selection around ends of a list on theEnvironment | IntelliSense | Completion Appearance page of ReSharper optionsAlt+R, O.

  • When choosing a method call from the completion list, by default ReSharper automatically inserts a pair of parentheses( ) and sets the caret between them. You can change this behavior with theAutomatically insert parenthesis after completion option on theEnvironment | IntelliSense | Completion Behavior page of ReSharper optionsAlt+R, O.

Here are some other general points that show how ReSharper's code completion features are different from Visual Studio's native IntelliSense:

  • As you type, the list of completion suggestions is narrowed down to match your input. If necessary, you can turn this off by clearing the corresponding checkbox on theEnvironment | IntelliSense | Completion Behavior page of ReSharper options . You can also specify the initial size of the completion list using the corresponding option on theEnvironment | IntelliSense | Completion Appearance page of ReSharper options .

  • Immediate members of a type are emphasized, as opposed to inherited members.

  • When you select a suggestion in the list, ReSharper displays its summary taken from the XML documentation. You can disable this by clearing theShow summary checkbox on theEnvironment | IntelliSense | Completion Appearance page of ReSharper options .

  • By default, all overloads of a method are shown as a single method name without a signature in the suggestion list. When you select it, the list of overloads, if any, appears in a popup where you can study them. To switch between signatures in the popup, you can pressControl+P. If you want to see each signature of an overloaded method separately in the completion list, selectShow member signatures on theEnvironment | IntelliSense | Completion Appearance page of ReSharper options .

  • Where applicable, Code Completion suggests indexers along with type members, and corrects expression syntax accordingly if an indexer is selected.

  • Custom icons for parameters and local variables are provided to distinguish them from fields.

  • When you declare a field, method parameter, or local variable, ReSharper suggests a list of possible names to choose from taking into account other names in the current context and yournaming rules.

In this section:

28 April 2025
Coding assistanceAutomatic completion

[8]ページ先頭

©2009-2025 Movatter.jp