JetBrains Rider 2017.2 Help

Code Style. VB.NET

File | Settings | Editor | Code Style | VB.NET for Windows and Linux
JetBrains Rider | Preferences | Editor | Code Style | VB.NET for macOS
Ctrl+Alt+S settings


On this page of JetBrains Rider settings, you can configure various aspects of code style in VB.NET. Code style preferences are grouped in the following tabs:

Tabs and Indents

On this tab, you can specify how JetBrains Rider should format indents in your code when you type or when you reformat existing code.

If there are .editorconfig files that affect your solution, preferences on this and other tabs with formatter settings could be overridden by EditorConfig styles. You will see a yellow warning if at least one preference on a page is overridden by EditorConfig styles for the current file, each overridden preference will also be highlighted with yellow. For example:

Code formatting options overridden by EditorConfig styles

Naming

On this tab, you can configure symbol naming rules for VB.NET.

JetBrains Rider helps you define, control, and apply naming style for symbols in your code. Naming style is implemented as a set of rules, each of which targets specific identifiers with the set of constraints (e.g. a rule can target static private readonly fields). Each rule can have one or more associated styles that define suffixes, prefixes, capitalization of compound words, etc.

These rules are taken into account when JetBrains Rider produces new code with code completion and code generation features, applies code templates and performs refactorings. JetBrains Rider also helps you detect and fix violations of naming rules. If necessary, the automatic checkup of naming rules can be configured or disabled.

Code Style

Preferences configurable on this tab are taken into account when JetBrains Rider produces new code with code completion and code generation features, applies code templates and performs refactorings. They can also be applied to the existing code by using code cleanup with the corresponding settings.

The preferences with the Notify with selector have corresponding code inspections that notify you if this aspect of the code style in the inspected scope differs from the the preferred style. Using the selectors, you can configure severity levels of the inspections.

ItemDescription
Reference qualification Preferences in this section define the style of namespace imports:
  • Prefer fully qualified references - select this check box if you prefer use fully qualified names rather than namespace import directives for imported types.
  • Allow the 'imports' alias directive - selecting this check box allows using aliases in namespace import directives, as opposed to fully qualified namespace names.

Blank Lines

This tab lets you configure whether JetBrains Rider should increase or decrease the number of blank lines around namespaces, members, regions and groups of import directives. You can adjust the values and check the preview pane at the bottom of the page to see how your preferences affect the code.

Options in the Preserve Existing Formatting section are only applied when JetBrains Rider reformats existing code whereas the Blank Lines section contains options that also take effect when you type new code.

Line Breaks and Wrapping

Use this tab to configure how JetBrains Rider should add or remove line breaks before/after specific language constructions and whether to wrap long lines exceeding the length specified by the Right margin (columns). Options in the Preserve Existing Formatting section are only applied when JetBrains Rider reformats existing code while the remaining sections contain options that also take effect when you type new code. You can adjust the values and check the preview pane at the bottom of the page to see how your preferences affect the code.

Spaces

This tab is used to configure automatic insertion/deletion of spaces in certain positions of your source code. You can adjust the values and check the preview pane at the bottom of the page to see how your preferences affect the code.

Other

This tab helps configure a number of additional settings that control how JetBrains Rider treats new code and reformats existing code. You can adjust the values and check the preview pane at the bottom of the page to see how your preferences affect the code.

Last modified: 17 November 2017