JetBrains Rider 2023.2 Help

Typing Assistance

On this page and its child pages of JetBrains Rider options, you can configure various typing assistance features.

Typing assist

Use CamelHumps

Enables CamelHumps for the following actions:

  • Extend/Shrink Selection ( Control+W / Control+Shift+W)

  • Caret Move Control+ArrowRight/Control+ArrowLeft

  • Caret Move with Selection (Control+Shift+ArrowRight/Control+Shift+ArrowLeft)

  • Select Word at Caret Control+W

  • Delete to Word Start/End (Control+Backspace and Control+Delete respectively)

  • Double-clicking (if Honor "CamelHumps" word settings when selecting using double click is enabled).

If this checkbox is selected, the words that compose CamelCased names are taken into account when you use these actions.

JetBrains Rider also provides similar actions that work in a mode opposite to the one selected in the Use CamelHumps setting:

  • Move Caret to Previous Word in Different "CamelHumps" mode

  • Move Caret to Previous Word with Selection in Different "CamelHumps" mode

  • Move Caret to Next Word in Different "CamelHumps" mode

  • Move Caret to Next Word with Selection in Different "CamelHumps" mode

  • Delete to Word End in Different "CamelHumps" mode

  • Delete to Word Start in Different "CamelHumps" mode

For example, if Use CamelHumps is enabled, the action Move Caret to Next Word in Different "CamelHumps" mode moves the caret to the end of word regardless of uppercase characters in this word; if Use CamelHumps is disabled, then the caret moves to the next CamelHump within this word.

These actions have no default keyboard shortcuts, and are not included in the menus, but you can invoke them from Go to Action Control+Shift+A:

Alternative actions for CamelHump navigation

You can bind them with the shortcuts of your choice as described in the section Customize keyboard shortcuts.

Auto-format on closing brace

If this checkbox is selected, JetBrains Rider applies code formatting rules to the block of code when you type its closing brace.

Auto-format on paste

This selector lets you configure whether to apply code formatting rules for pasted code. By default, JetBrains Rider only applies indentation settings when you paste code, which is a convenient option if you do not want to follow formatting rules very strictly.

Correct common language-specific typos

If this checkbox is selected, JetBrains Rider automatically fixes mistyped characters - @$ in verbatim string interpolation or dot or semicolon inside parentheses.

You may want to clear this checkbox if you prefer to specify double values without the leading zero, for example DoSomething(.33);.

Enable structural remove

JetBrains Rider can automatically remove remaining whitespaces and utility characters after you remove parts of different code constructs. For example, , after removing a parameter or an argument, [] after removing an attribute, or = after removing an initializer.

This happens when you press Backspace, Delete, or Control+X on a code element selected with structural selection ( Control+W) or with structural navigation (Tab), or if the selection is there after rearranging elements (Ctrl+Shift+Alt + Up/Down/Left/Right).

JetBrains Rider: Structural remove

Smart indent on Enter

If this checkbox is selected, each time you press Enter in the editor, JetBrains Rider will calculate the indent for the next line taking into account all settings that affect indentation, for example whether and how to use tabs (configurable on Editor | Code Style | [Lanugage] | Tabs, Indents, Alignment), whether to align chain method calls (configurable on Editor | Code Style | C# | Line Breaks and Wrapping), and so on .

Insert virtual indent on enter

If this option is enabled, JetBrains Rider does not insert indent characters (which could be whitespaces, tabs, or a mix of both, depending on the settings) right after you press Enter. However, it sets the caret according to the indent calculated for this line. If you type anything in this line, the indent characters will be added; if you press Enter once again, no trailing spaces will be left.

You may want to disable this option if you prefer to indent with tabs, align with spaces.

Insert * on Enter after /*

If this option is enabled, JetBrains Rider will insert the asterisk * in the beginning of each line of a block comment as you press Enter.

Jump outside of closing brackets with Tab

When this option is enabled, you can press Tab to jump out of brackets (curly braces, square brackets, and parentheses) as well as out of quotes when your caret is right before the closing one.
This comes in handy when your caret is automatically set inside brackets or quotes created with code completion, and you want to continue typing without reaching down to the right arrow key.

The nested option Jump outside of closing quotes/braces in string literals with Tab lets you toggle this behavior inside string literals.

The nested option Jump outside of closing braces when Tab is at indenting lets you toggle this behavior when the code construct that uses brackets, spans several lines and your caret is at the beginning of a new line just before the closing bracket. For example:

Console.WriteLine( "one" + "two" /*caret*/);

Unindent on Backspace

This option defines the behavior of the Backspace key when it is pressed on an empty line or when there are only whitespaces and tabs to the left of the caret. The available options are:

  • Disabled — returns the caret by one position at a time.

  • To nearest indent position — returns the caret to a nearest position that is a multiple of the current indent size.

  • To proper indent position (default) — returns the caret to the expected indent position according to the code structure.

Braces and parentheses

Surround selection on typing a quote, brace or parenthesis

If this checkbox is selected, you can select a code block or an expression, then type an opening { or a closing } brace to put the selection inside braces, or type an opening ( or a closing ) parenthesis to put the selection inside parentheses.

Auto-insert pair brackets, parenthesis and quotes

If this checkbox is selected, a closing bracket, parenthesis or quote is automatically created whenever you type the corresponding opening element [, (, " or '. If you change your mind and press Backspace to delete the opening delimiter, its closing pair is also deleted.

Join concatenated strings when removing the plus sign between them

By default, if you delete the + sign between the concatenated parts of a string literal, the parts will be merged into a single literal and the redundant quotes will be removed.

Use this option to disable this behavior.

Auto-insert closing brace

If this checkbox is selected, a closing brace is inserted automatically:

  • Immediately after you've typed the opening brace (On typing an opening brace)

  • After you've typed the opening brace and pressed Enter (On Enter after an opening brace)

Structural navigation (C#, XML, web languages)

Use Tab/Shift+Tab keys for structural navigation

This checkbox enables structural navigation and overrides the behavior of Tab and Shift+Tab. There are also several sub-options that allow you to specify when the standard behavior of these keys should be preserved.

C#

Annotate nullability on '!'/'?' after type name

When this option is enabled, JetBrains Rider will automatically add the [NotNull]/[CanBeNull] annotations when you type '!'/'?' after a type name in a method signature or member declaration. E.g: if you type public void Foo(string?, JetBrains Rider will automatically convert it to public void Foo([CanBeNull] string.

Annotate nullability on '!'/'?' at other positions

When this option is enabled, JetBrains Rider will automatically add the [NotNull]/[CanBeNull] annotations when you type '!'/'?' after a name of the declared symbol or parameter in a method signature or member declaration. E.g: if you type public void Foo(string myStr?, JetBrains Rider will automatically convert it to public void Foo([CanBeNull] string myStr.

Insert parameter null check on '!' when parameter is annotated as 'NotNull'

If a parameter is marked with the [NotNull] attribute, you can place the caret directly after the parameter name or parameter type and press !:

private void Foo([NotNull] object/*!*/ arg/*!*/)

JetBrains Rider will generate a null check for this parameter. You can configure the null-check pattern on the Code Editing | C# | Null Checking page of JetBrains Rider settings Control+Alt+S.

Insert documentation comment stub on '/'

If this checkbox is selected, you will be able to add a stub for XML documentation comments by typing /// at a line preceding type or member declaration.

Visual Basic.NET

Insert end constructs

If this checkbox is selected, JetBrains Rider will automatically add a matching end construct when you type the opening part. For example, when you type Sub, End Sub will be added automatically.

HTML

Auto-format on enter

If this checkbox is selected, JetBrains Rider applies code formatting rules to the recently typed code after you press Enter.

Auto-format on closing tag

If this checkbox is selected, JetBrains Rider automatically formats recently added code after you type the closing tag of an element.

Synchronous changing of matching tag

If this checkbox is selected, JetBrains Rider simultaneously changes the closing tag when you are editing the opening tag of an element and vice versa.

ASP.NET

Auto-format on enter

If this checkbox is selected, JetBrains Rider applies code formatting rules to the recently typed code after you press Enter.

Auto-format on closing tag

If this checkbox is selected, JetBrains Rider automatically formats recently added code after you type the closing tag of an element.

Synchronous changing of matching tag

If this checkbox is selected, JetBrains Rider simultaneously changes the closing tag when you are editing the opening tag of an element and vice versa.

Razor

Auto-format on enter

If this checkbox is selected, JetBrains Rider applies code formatting rules to the recently typed code after you press Enter.

Auto-format on closing tag

If this checkbox is selected, JetBrains Rider automatically formats recently added code after you type the closing tag of an element.

Synchronous changing of matching tag

If this checkbox is selected, JetBrains Rider simultaneously changes the closing tag when you are editing the opening tag of an element and vice versa.

Allow CPU-intensive typing assist

this checkbox.

C++, C, HLSL

Reindent on closing brace

If this checkbox is selected, JetBrains Rider will automatically insert the necessary number of Tabs and/or spaces according to code structure and settings when you type the closing brace.

Generate documentation comments

If this checkbox is enabled, JetBrains Rider will generate a documentation comment stub when you type /**, /*!, /// or //!, and then press Enter.

Insert '*/' after '/*'

If this checkbox is selected, JetBrains Rider will automatically add the closing sequence for a block comment (*/) when you type the opening sequence (/*) and place the caret at the position to type the comment.

Miscellaneous

Home moves caret to first non-whitespace character

When this checkbox is selected, on pressing Home, the caret is positioned at the first non-whitespace character of the current line. Pressing Home subsequently moves the caret from the Smart Home position to the first column and back.

End on blank line moves caret to indent position

When this checkbox is selected, on pressing End in an empty line, the caret is positioned with the indent, which JetBrains Rider assumes to be reasonable in the current code point (indentation is based on the current Code Style Settings).

Add multiple carets on double Control with arrow keys

If this checkbox is selected, then:

  • pressing Control plus up/down arrow keys leads to creating multiple carets.

  • pressing Control plus left/right arrow keys or Home/End leads to creating a selection.

For more information, refer to the Multicursor section.

Insert documentation comment stub

This checkbox defines the behavior on pressing Enter after the opening documentation comment. This functionality works only for JavaScript and TypeScript. To insert XML documentation comments stubs in C# on ///, make sure that the Insert documentation comment stub on '/' checkbox in the C# section above on this page is selected.

  • If this checkbox is selected, JetBrains Rider generates a documentation comment stub.

    For the function comments, this stub contains the required tags (@param tags for each parameter declared in the signature, and @return). For more information, refer to , JSDoc comments.

  • If this checkbox is not selected, only the closing part of the comment is generated.

HTML/CSS

XML/HTML

In this area, define the actions to be invoked automatically when editing XML or HTML code.

  • Insert closing tag on tag completion: select this checkbox to have JetBrains Rider automatically insert a closing XML or HTML tag upon entering the corresponding opening one.

  • Insert required attributes on tag completion: select this checkbox to have JetBrains Rider display a template with all mandatory attributes of the typed tag.

  • Insert required subtags on tag completion: select this checkbox to have JetBrains Rider display a template with all mandatory subtags.

  • Start attribute on tag completion: select this checkbox to have JetBrains Rider display a template with the first mandatory attribute of the typed tag.

  • Add quotes for attribute value on typing '=' and attribute completion: select this checkbox to have JetBrains Rider automatically add quotes for the value of the attribute that you are currently typing.

  • Auto-close tag on typing '</': select this checkbox to automatically add a closing tag after entering </. Clear this checkbox to turn off such auto-completion.

  • Simultaneous <tag></tag> editing: When this checkbox is selected, and you edit an opening tag, the corresponding closing tag is automatically changed accordingly.

    If this checkbox is cleared, editing the opening tag does not affect the closing tag which remains unchanged. As a result, the opening and closing tags do not match and the entire construct is underlined as erroneous.

    The Simultaneous <tag></tag> editing checkbox controls the behavior of JetBrains Rider in the following contexts:

    • HTML files

    • HTML injections within JavaScript code

    • HTML with Handlebars/Mustache templates

    • Handlebars/Mustache template files with the extension .hbs

    • XML, XHTML files

    • DTD files

    • JSX files

CSS

In this area, define the selection of CSS identifiers/classes:

  • Select whole CSS identifier on double-click: if this checkbox is selected, double-clicking a CSS identifier or class name selects the entire name up to the prefix. For example, double-clicking gray within <div class="text-gray-600"> select the whole class name text-gray -600:

    Select whole CSS identifier on double-click: ON

    If this checkbox is cleared, double-clicking a CSS identifier or class name selects a portion of the name up to of within the nearest hyphens:

    Select whole CSS identifier on double-click: OFF

JavaScript

Automatically replace string literal with template string on typing '${'

By default, the checkbox is selected and string literals are converted to template strings automatically when you type ${. This behavior may break interpolation in your code, for example, in Vue.js templates.

Clear the checkbox to prevent breaking interpolation and preserve string literals.

Automatic replacement on typing '${' is on
Automatic replacement on typing '${' is off

Start template string interpolation on typing '$'

Select this checkbox to insert expressions with normal strings after the $ sign instead of adding curly braces {} automatically. For more information, refer to Expression interpolation.

Interpolation off
Interpolation on

Escape text on paste in string literals

By default, JetBrains Rider automatically inserts backslash escape symbols (\) when you paste text into a JavaScript string. Clear the checkbox to suppress automatic text escaping.

Convert attributes when pasting HTML into JSX files

By default, when you copy a piece of HTML code with class attributes or on-event handlers and paste it into JSX, JetBrains Rider automatically replaces these attributes with React-specific ones (className, onClick, onChange, and so on.)

To copy HTML code to JSX "as is", clear the checkbox or use Paste Simple Control+Alt+Shift+V.

YAML

Auto expand key sequences upon paste

With this option selected, JetBrains Rider properly formats key sequences when you paste them from the clipboard. For example, the key2.another_key sequence pasted from the clipboard will be displayed with the correct hierarchy.

Auto expand key sequences upon paste is on

Otherwise, if the option is cleared, key sequences are pasted from the clipboard "as is", hierarchy is not preserved, and consequently proper highlighting is not provided.

Auto expand key sequences upon paste is off

SQL

Insert string concatenation on Enter

You may want to turn this option off, if the DBMS you are working with supports multiline string literals:

Say, there is the following fragment for PostgreSQL text value notes:

SET notes = 'Lightest element'

and the caret is in front of the word element.

If the option is on, and you press Enter, the fragment will change to:

SET notes = 'Lightest ' || 'element'

Otherwise, the fragment will change to:

SET notes = 'Lightest element'

Close code blocks on Enter

When you start a code block with an opening keyword (BEGIN, LOOP, BEGIN TRY, and others) and press Enter, the code block closes with the corresponding closing keywords (END, END LOOP, END TRY, and others).

Close code blocks on Enter

Qualify object on code completion

The selected option defines how the name of an object is inserted in the editor when using the code completion suggestion box.

  • Always: the qualified object names are always used, for example <schema_name>.<object_name>.

  • On collisions: the qualified object name is used only if the short name is ambiguous, for example, when there is the object with the same name in more than one schema.

  • Never: the unqualified object names are always used.

Last modified: 26 June 2023