JetBrains Rider 2024.1 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 ( Ctrl+W/ Ctrl+Shift+W)

  • Caret Move Ctrl+Right/Ctrl+Left

  • Caret Move with Selection (Ctrl+Shift+Right/Ctrl+Shift+Left)

  • Select Word at Caret Ctrl+W

  • Delete to Word Start/End (Ctrl+Backspace and Ctrl+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 Ctrl+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 Ctrl+X on a code element selected with structural selection ( Ctrl+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 Ctrl+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

If you are working on large Razor views and the editor begins to lag, you can turn off CPU-intensive assistance and automatic suggestions by clearing 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 Ctrl with arrow keys

If this checkbox is selected, then:

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

  • pressing Ctrl 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.

Last modified: 11 February 2024