| title | Configure advanced Text Editor options | ||||
|---|---|---|---|---|---|
| description | Learn how to configure the Advanced page to customize global settings for the Visual Studio text editor, including completion mode, scrolling, and text rendering. | ||||
| ms.date | 03/20/2026 | ||||
| ms.topic | how-to | ||||
| f1_keywords |
|
||||
| helpviewer_keywords |
|
||||
| ms.custom | awp, ide-ref | ||||
| ai-usage | ai-assisted | ||||
| author | ghogen | ||||
| ms.author | ghogen | ||||
| ms.subservice | general-ide | ||||
| monikerRange | >=vs-2022 |
This article shows you how to configure advanced settings for the Visual Studio editor. You can customize difference display modes, code completion behavior, scrolling sensitivity, and text formatting. The advanced editor features allow you to improve your editing experience and performance.
::: moniker range="visualstudio"
:::image type="content" source="media/visualstudio/tools-options-text-editor-advanced.png" alt-text="Screenshot of the All Settings, Text Editor, Advanced options in Visual Studio.":::
::: moniker-end ::: moniker range="vs-2022"
:::image type="content" source="media/vs-2022/tools-options-text-editor-advanced.png" alt-text="Screenshot of the Advanced settings for the text editor in the Options dialog box.":::
::: moniker-end
::: moniker range="visualstudio"
In Visual Studio, select Tools > Options. In the Options pane, expand the All Settings > Text Editor > Advanced section, and configure the desired settings. Related settings are available in the All Settings > Text Editor > Touchpad and mouse wheel scrolling sensitivity section.
Use this setting to configure the behavior of the horizontal scroll bar in the Visual Studio IDE. Select from the following options:
- Adjust according to available space: Dynamically adjust the size of the scrollbar based on the available space in the current view.
- Always show in the editor tray: Display the scrollbar within the bounds of the editor tray that shows other available actions.
- Always show above the editor tray: Display the scrollbar above the editor tray within its own space.
The following sections describe the other available settings.
::: moniker-end ::: moniker range="vs-2022"
In Visual Studio, select Tools > Options. In the Options dialog, expand the Text Editor > Advanced section, and configure the desired settings.
::: moniker-end
Use these options to control how the Difference viewer displays changes when you add, remove, or modify lines of text.
The Whole line option is enabled by default. You can choose from the following options to customize highlighting and outlining:
- Whole line: Line differences are displayed to take up the entire width of the viewport.
- Code contour: Line differences are displayed only to the last character on each line.
- Block outline: Line and word differences are shown as outlined rectangles.
- Mixed outline: Line differences are shown as outlined rectangles and word differences are shown as colored rectangles.
::: moniker range="visualstudio"
::: moniker-end ::: moniker range="vs-2022"
::: moniker-end
When this setting is enabled (default), Visual Studio adds a margin next to the scrollbar so you can view the difference between Git commits. Red text in the margin indicates a deletion and green indicates an addition.
The Single click setting is selected by default. You can customize how Peek Definition works when viewing differences between Git commits:
- Single click (default): Opens Peek Difference with a single click.
- Double click: Requires a double click to open Peek Difference.
- None (or Off): Turns off the Peek Difference UI.
Use these options to control IntelliSense and code completion behavior.
When this setting is enabled (default), the editor suggests possible completions for your code based on its context and language semantics. Clear this option to turn off autocomplete mode.
Choose from one of the following completion mode settings:
- Automatic (default): Completes on punctuation and special characters.
- Tab-only: Completes only on tab.
- Last used: Preserves the last setting you used with Ctrl+Alt+Space.
When this setting is enabled, Visual Studio provides autocomplete functionality based on words typed rather than code for files by using TextMate grammars. Clear this option to turn off word-based suggestions.
Use this setting to increase or decrease the maximum parser line limit. The default value is 10000. If you change the value, you need to restart the application.
Tip
For more information about TextMate grammars, see Add Visual Studio editor support for other languages.
Use these options to customize how the editor displays and interacts with your code.
By default, CodeLens information appears over a code line. When you enable this setting, the CodeLens information displays directly in your code line at your current caret position.
When this setting is enabled, Visual Studio shows the CodeLens indicator at the file level.
::: moniker range="visualstudio"
::: moniker-end ::: moniker range="vs-2022"
::: moniker-end
Enable this setting to disable the new multi-caret selection behavior in Visual Studio 2022 or later, which provides the following functionality:
- Adapts "block selection" similarly as does the multi-caret functionality in Visual Studio Code.
- Supports copying and pasting a different section of text with each caret, instead of just a single block-shaped section of text.
- Moves each caret when you press the arrow keys, and doesn't dismiss the block selection.
Note
When this setting is enabled, the option applies the box selection behavior available in Visual Studio 2019 and earlier versions. Specifically, the option enables you to select a rectangular section of items when you select Alt and then drag your mouse to highlight text (or select Shift+Alt+Left/Up/Right/Down to highlight text). This option is limited when you press an arrow key. Visual Studio dismisses the box selection and returns to a single caret.
::: moniker range="visualstudio"
When this setting is enabled (default), Visual Studio recognizes whether you prefer to use tabs or spaces to indent code based on your most recently updated file. When the setting is cleared, Visual Studio uses the Tools > Options settings under All Settings > Languages > Defaults > Tabs instead.
::: moniker-end ::: moniker range="vs-2022"
When this setting is enabled (default), Visual Studio recognizes whether you prefer to use tabs or spaces to indent code based on your most recently updated file. When the setting is cleared, Visual Studio uses the Tools > Options settings under Text Editor > All Languages > Tabs instead.
::: moniker-end
Tip
You can also change how Visual Studio manages your preferred indent style by using an .editorconfig file. For more information, see Create portable, custom editor settings with EditorConfig.
::: moniker range="visualstudio"
Use this setting to enable syntactic line compression for blank lines in the editor. Blank lines are rendered shorter so you can see more code vertically without changing the font size. This setting is disabled by default.
Use this setting to compress lines that don't contain letters or numbers, such as lines with only symbols. This option helps reduce visual space used by low-information lines while keeping regular code lines at normal height. This setting is disabled by default.
::: moniker-end ::: moniker range="vs-2022"
When this setting is enabled, Visual Studio uses indexing when you run the Find in Files action. Clear this option if you don't what the action to include indexing.
Select this option to disable TextMate fallback support for symbol search, which can help improve system performance. (Available in Visual Studio 2022 version 17.0 through 17.3 only.)
::: moniker-end
Use these options to control how Visual Studio handles copy and paste operations.
::: moniker range="visualstudio"
When this setting is enabled (default), Visual Studio copies text with syntax highlighting, colors, and formatting. The copied text includes HTML clipboard format, so you can paste colorized code into:
- Web versions of Office apps (Word, PowerPoint, Outlook)
- Azure DevOps work items
- Email clients that support HTML
- Other HTML-based controls
This feature makes it easy to share code snippets in presentations, documentation, and collaboration tools while preserving syntax highlighting.
Tip
If you experience UI delays during copy/paste operations, clear this option to copy plain text instead. Rich copy with HTML formatting can cause temporary hangs on large selections.
::: moniker-end ::: moniker range="vs-2022"
When this setting is enabled (default), Visual Studio copies text that includes colors and ligatures. Clear this option to copy flat text instead.
Tip
Unselecting this option improves the responsiveness and performance of Visual Studio during a copy/paste operation. Rich copy can cause UI delays and temporary hangs.
::: moniker-end
Use this setting to increase or decrease the maximum character count of rich text you can copy or cut from your code. The default value is 10240. Beyond this limit, text is still copied, but as plain text rather than rich text.
::: moniker range="vs-2022"
Select this option to allow for semantic colorization. A "wait" dialog might appear after a few seconds. Syntactic colorization is fast to copy, while semantic colorization is slower. Semantic information allows for richer and more accurate colorization. (Available in Visual Studio 2022 through version 17.8.)
::: moniker-end
Use these options to control how Visual Studio manages background tasks while you're typing.
When this setting is enabled (default), Visual Studio stops background tasks when you're typing in the text editor. This option controls how aggressive Visual Studio is about canceling work that might temporarily freeze the UI while you type.
::: moniker range="visualstudio"
When this setting is enabled, Visual Studio loads the editor components asynchronously as they're available, rather than loading all components at the same time. This approach might result in a slight visual delay as the components are prepared. This setting was previously available as the Preview feature Initialize editor parts asynchronously during solution load. (Some extensions might not support this option.)
::: moniker-end ::: moniker range="vs-2022"
When this setting is enabled (default), Visual Studio adjusts the maximum typing latency a feature or extension can cause before it cancels the action.
Select this option if you prefer to set a specific maximum latency that Visual Studio applies while you're typing in the text editor.
Use the Editor horizontal scrollbar location setting to configure the behavior of the horizontal scroll bar in the Visual Studio IDE. Select from the following options:
- Adjust according to available space: Dynamically adjust the size of the scrollbar based on the available space in the current view.
- Always show in the editor tray: Display the scrollbar within the bounds of the editor tray that shows other available actions.
- Always show above the editor tray: Display the scrollbar above the editor tray within its own space.
::: moniker-end
Use these options to fine-tune how Visual Studio formats and renders text based on your hardware.
This setting lets you configure how text is formatted. The default value is Automatic. You can choose from two other options:
- Ideal: Use the highest quality text formatting.
- Display: Optimize the formatting based on display performance.
Choose the option that best allows you to fine-tune text formatting in the editor based on your specific hardware.
For more information, see TextFormattingMode.
This setting lets you configure how text is rendered. The default value is Automatic. You can choose from three other options:
- ClearType: Use ClearType rendering for smoother text.
- Greyscale: Use greyscale anti-aliasing.
- Aliased: Use aliased rendering without anti-aliasing.
Choose the option that best allows you to fine-tune text rendering in the editor based on your specific hardware.
For more information, see TextRenderingMode.
::: moniker range="visualstudio"
Use these options to improve scrolling performance in Visual Studio.
::: moniker-end ::: moniker range="vs-2022"
Use the Touchpad and mouse wheel scrolling sensitivity options to improve scrolling performance in Visual Studio.
::: moniker-end
Use this setting to adjust how many vertical lines you want to scroll in each user-interface action. The default value is 3.
Use this setting to adjust how many characters you want to scroll in each user-interface action. The default value is 1.
::: moniker range="visualstudio"
This setting increases scrolling speed when you hold Alt while scrolling with the mouse wheel in the code editor. On a touchpad, hold the Alt key while moving two fingers up or down. The default multiplication factor is 5, which scrolls five times faster than normal.
When this setting is enabled, you can press and hold the middle mouse button (scroll wheel) and then move the mouse to scroll quickly through the document in any direction. This feature is useful for navigating large files without relying on traditional scroll bars or repeated wheel scrolling. The setting is disabled by default.
For more information about navigating code, see Navigate code.
::: moniker-end