Add settings URLs for core documentation (#7535)

* Add settings url syntax

* Update settings

* Add default settings file for settings rendering in docs

* Remove default settings build file
This commit is contained in:
Nick Trogh 2024-08-30 17:56:01 +02:00 коммит произвёл GitHub
Родитель 0c1b8c479c
Коммит 1ab957e2ab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
49 изменённых файлов: 319 добавлений и 319 удалений

Просмотреть файл

@ -23,7 +23,7 @@ It is also possible to connect to the remote Docker engine directly using SSH tu
* **Linux:** `ssh-agent` is present by default. Do `ssh-add <keyfile>`. Ubuntu was tested; you might have different results on other distributions.
* **macOS:** `ssh-agent` is present by default, but `ssh-add` does not persist across logins. Do `ssh-add <keyfile>`. We recommend configuring VS Code to run this command on terminal startup with `terminal.integrated.profiles.osx` `args` value or otherwise configuring a startup script. You can also manually run that command each login.
* **macOS:** `ssh-agent` is present by default, but `ssh-add` does not persist across logins. Do `ssh-add <keyfile>`. We recommend configuring VS Code to run this command on terminal startup with `setting(terminal.integrated.profiles.osx)` `args` value or otherwise configuring a startup script. You can also manually run that command each login.
1. Verify that your identity is available to the agent with `ssh-add -l`. It should list one or more identities that look something like `2048 SHA256:abcdefghijk somethingsomething (RSA)`. If it does not list any identity, you will not be able to connect. Also, it needs to have the right identity. The Docker CLI working does not mean that the Explorer window will work. The Explorer window uses [dockerode](https://www.npmjs.com/package/dockerode) (which in turn uses [ssh2](https://www.npmjs.com/package/ssh2)), whereas the Docker CLI uses the `ssh` command, and benefits from an automatically inferred configuration.

Просмотреть файл

@ -79,7 +79,7 @@ To give you relevant inline suggestions, Copilot looks at the current and open f
### Settings
You can configure the font for the inline suggestions with the `editor.inlineSuggest.fontFamily` setting.
You can configure the font for the inline suggestions with the `setting(editor.inlineSuggest.fontFamily)` setting.
## Next steps

Просмотреть файл

@ -52,7 +52,7 @@ Depending on your question, Copilot can also suggest code modifications or refac
![Copilot inline chat asking to convert a sort alogrithm to use bubble sort](images/copilot-chat/inline-chat-convert-sort.png)
With the `inlineChat.mode` setting, you can configure how inline chat shows updates in the editor. The default setting value is `live`, which means that the updates are applied directly in the editor, and you can compare the changes by using the inline diff viewer. If you prefer to preview the changes side-by-side, you configure the setting to `preview`.
With the `setting(inlineChat.mode)` setting, you can configure how inline chat shows updates in the editor. The default setting value is `live`, which means that the updates are applied directly in the editor, and you can compare the changes by using the inline diff viewer. If you prefer to preview the changes side-by-side, you configure the setting to `preview`.
The following example shows the `preview` mode for inline chat.
@ -110,10 +110,10 @@ If Copilot Chat detects that a code block contains a command, you can run it dir
You can control the font for code blocks in chat with the following settings:
* `chat.editor.fontFamily`
* `chat.editor.fontSize`
* `chat.editor.fontWeight`
* `chat.editor.lineHeight`
* `setting(chat.editor.fontFamily)`
* `setting(chat.editor.fontSize)`
* `setting(chat.editor.fontWeight)`
* `setting(chat.editor.lineHeight)`
> **Tip**: Navigate between code blocks with **Chat: Next Code Block** (`kb(workbench.action.chat.nextCodeBlock)`) and **Chat Previous Code Block** (`kb(workbench.action.chat.previousCodeBlock)`).
@ -299,7 +299,7 @@ Learn more about how to [use voice interactions in VS Code](/docs/editor/voice.m
## Privacy and transparency
We emphasize responsible usage of AI, especially when it comes to source code. The `inlineChat.acceptedOrDiscardBeforeSave` setting, which is enabled by default, asks you for confirmation before saving code that was generated by Copilot.
We emphasize responsible usage of AI, especially when it comes to source code. The `setting(inlineChat.acceptedOrDiscardBeforeSave)` setting, which is enabled by default, asks you for confirmation before saving code that was generated by Copilot.
When the setting is enabled, a file save operation waits for you to accept or discard any pending inline chat session. This also applies when Auto Save is enabled, which will be temporarily disabled until inline chat has ended.

Просмотреть файл

@ -324,7 +324,7 @@ The Features sourced in VS Code UI now come from a central index, which you can
### "Always installed" Features
Similar to how you can [set extensions to always be installed](#always-installed-extensions) in your dev container, you can use the `dev.containers.defaultFeatures` User [setting](/docs/getstarted/settings.md) to set Features you'd always like installed:
Similar to how you can [set extensions to always be installed](#always-installed-extensions) in your dev container, you can use the `setting(dev.containers.defaultFeatures)` User [setting](/docs/getstarted/settings.md) to set Features you'd always like installed:
```json
"dev.containers.defaultFeatures": {
@ -446,7 +446,7 @@ If a base image or Feature configures an extension that you do not want installe
### "Always installed" extensions
If there are extensions that you would like always installed in any container, you can update the `dev.containers.defaultExtensions` User [setting](/docs/getstarted/settings.md). For example, if you wanted to install the [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) and [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extensions, you would specify their extension IDs as follows:
If there are extensions that you would like always installed in any container, you can update the `setting(dev.containers.defaultExtensions)` User [setting](/docs/getstarted/settings.md). For example, if you wanted to install the [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) and [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extensions, you would specify their extension IDs as follows:
```json
"dev.containers.defaultExtensions": [

Просмотреть файл

@ -25,7 +25,7 @@ You can adjust the zoom level in VS Code with the **View** > **Appearance** > **
### Persisted zoom level
When you adjust the zoom level with the **View** > **Appearance** > **Zoom In / Out** commands, the zoom level is persisted in the `window.zoomLevel` [setting](/docs/getstarted/settings.md). The default value is 0 and each increment/decrement changes the zoom level by 20 percent.
When you adjust the zoom level with the **View** > **Appearance** > **Zoom In / Out** commands, the zoom level is persisted in the `setting(window.zoomLevel)` [setting](/docs/getstarted/settings.md). The default value is 0 and each increment/decrement changes the zoom level by 20 percent.
## Accessibility help
@ -108,7 +108,7 @@ One of the best approaches to selecting the best colors for a specific condition
## Dim unfocused editors and terminals
Unfocused views can be dimmed to make it clearer where typed input will go. This is especially useful when working with multiple editor groups or terminals. Turn on this feature by setting `"accessibility.dimUnfocused.enabled": true`. You can control the dimness level with `accessibility.dimUnfocused.opacity`, which takes the opacity fraction from 0.2 to 1 (default 0.75).
Unfocused views can be dimmed to make it clearer where typed input will go. This is especially useful when working with multiple editor groups or terminals. Turn on this feature by setting `"accessibility.dimUnfocused.enabled": true`. You can control the dimness level with `setting(accessibility.dimUnfocused.opacity)`, which takes the opacity fraction from 0.2 to 1 (default 0.75).
## Keyboard navigation
@ -138,7 +138,7 @@ All elements in the workbench support tab navigation. To avoid having too many t
By default, pressing `kbstyle(Tab)` within a source code file inserts the Tab character (or spaces depending on your indentation setting) and does not leave the open file. You can toggle `kbstyle(Tab)` trapping with `kb(editor.action.toggleTabFocusMode)`, and subsequent `kbstyle(Tab)` keys will move focus out of the file. When default `kbstyle(Tab)` trapping is off, you will see a **Tab moves focus** indicator in the Status Bar.
Tab trapping also exists in the integrated terminal. The default behavior for the feature can be configured with `editor.tabFocusMode`.
Tab trapping also exists in the integrated terminal. The default behavior for the feature can be configured with `setting(editor.tabFocusMode)`.
![A Tab moves focus status bar item shows when the mode is active](images/accessibility/tab-moves-focus.png)
@ -158,7 +158,7 @@ VS Code supports screen readers in the editor using a strategy based on text pag
The **Go to Next/Previous Error or Warning** actions (`kb(editor.action.marker.nextInFiles)` and `kb(editor.action.marker.prevInFiles)`) allow screen readers to announce the error and warning messages.
When suggestions pop up, they are announced to screen readers. Navigate the suggestions using `kbstyle(Ctrl+Up)` and `kbstyle(Ctrl+Down)` and dismiss them with `kbstyle(Shift+Escape)`. If suggestions get in your way, you can turn them off with the `editor.quickSuggestions` setting.
When suggestions pop up, they are announced to screen readers. Navigate the suggestions using `kbstyle(Ctrl+Up)` and `kbstyle(Ctrl+Down)` and dismiss them with `kbstyle(Shift+Escape)`. If suggestions get in your way, you can turn them off with the `setting(editor.quickSuggestions)` setting.
In the diff view pane, the **Go to Next/Previous Difference** actions (`kb(editor.action.accessibleDiffViewer.next)` and `kb(editor.action.accessibleDiffViewer.prev)`) will show the Accessible Diff Viewer with diffs presented in a unified patch format. Navigate through the unchanged, inserted, or deleted lines with `kbstyle(Up)` and `kbstyle(Down)`. Press `kbstyle(Enter)` to return focus to the modified pane of the diff editor at the selected line number (or the closest line number that still exists, if a deleted line is selected). Use `kbstyle(Escape)` or `kbstyle(Shift+Escape)` to dismiss the Accessible Diff Viewer.
@ -172,7 +172,7 @@ When VS Code detects that a screen reader is being used, it goes into an optimiz
![Activating the screen reader optimized status bar will show a notification that allows disabling the mode](images/accessibility/screen-reader-mode.png)
Some features, such as folding and minimap (code overview), are disabled when in screen reader mode. You can control whether VS Code uses screen reader mode with the **Editor: Accessibility Support** setting (`editor.accessibilitySupport`) and the values are `on`, `off`, or the default `auto` that automatically detects a screen reader through querying the platform.
Some features, such as folding and minimap (code overview), are disabled when in screen reader mode. You can control whether VS Code uses screen reader mode with the **Editor: Accessibility Support** setting (`setting(editor.accessibilitySupport)`) and the values are `on`, `off`, or the default `auto` that automatically detects a screen reader through querying the platform.
## Input control and result navigation
@ -182,7 +182,7 @@ Navigating between an input control (for example, search or filter input) and it
You can display terminal accessibility help via `kb(editor.action.accessibilityHelp)`, which describes useful tips when using a screen reader. One tip is to use `kb(workbench.action.terminal.focusAccessibleBuffer)` to access the buffer in the terminal. This will automatically enter the screen reader's browse mode, depending on your screen reader, for an accessible view of the entire terminal buffer.
Use `editor.tabFocusMode` to control whether the terminal receives the `kbstyle(Tab)` key instead of the workbench, similar to the editor.
Use `setting(editor.tabFocusMode)` to control whether the terminal receives the `kbstyle(Tab)` key instead of the workbench, similar to the editor.
### Shell integration
@ -192,9 +192,9 @@ Another shell integration powered command, **Go to Symbol in Accessible View** (
### Minimum contrast ratio
Set `terminal.integrated.minimumContrastRatio` to a number between 1 and 21 to adjust text color luminance until the desired contrast ratio is met or pure white (`#FFFFFF`) black (`#000000`) is hit.
Set `setting(terminal.integrated.minimumContrastRatio)` to a number between 1 and 21 to adjust text color luminance until the desired contrast ratio is met or pure white (`#FFFFFF`) black (`#000000`) is hit.
Note that the `terminal.integrated.minimumContrastRatio` setting will not apply to `powerline` characters.
Note that the `setting(terminal.integrated.minimumContrastRatio)` setting will not apply to `powerline` characters.
## Status bar accessibility

Просмотреть файл

@ -36,7 +36,7 @@ VS Code supports multiple cursors for fast simultaneous edits. You can add secon
### Multi-cursor modifier
If you'd like to change the modifier key for applying multiple cursors to `kbstyle(Cmd+Click)` on macOS and `kbstyle(Ctrl+Click)` on Windows and Linux, you can do so with the `editor.multiCursorModifier` [setting](/docs/getstarted/settings.md). This lets users coming from other editors such as Sublime Text or Atom continue to use the keyboard modifier they are familiar with.
If you'd like to change the modifier key for applying multiple cursors to `kbstyle(Cmd+Click)` on macOS and `kbstyle(Ctrl+Click)` on Windows and Linux, you can do so with the `setting(editor.multiCursorModifier)` [setting](/docs/getstarted/settings.md). This lets users coming from other editors such as Sublime Text or Atom continue to use the keyboard modifier they are familiar with.
The setting can be set to:
@ -88,22 +88,22 @@ However, it's easy to turn on `Auto Save`, which will save your changes after a
For more control over `Auto Save`, open User or Workspace [settings](/docs/getstarted/settings.md) and find the associated settings:
* `files.autoSave`: Can have the values:
* `setting(files.autoSave)`: Can have the values:
* `off` - to disable auto save.
* `afterDelay` - to save files after a configured delay (default 1000 ms).
* `onFocusChange` - to save files when focus moves out of the editor of the dirty file.
* `onWindowChange` - to save files when the focus moves out of the VS Code window.
* `files.autoSaveDelay`: Configures the delay in milliseconds when `files.autoSave` is configured to `afterDelay`. The default is 1000 ms.
* `setting(files.autoSaveDelay)`: Configures the delay in milliseconds when `setting(files.autoSave)` is configured to `afterDelay`. The default is 1000 ms.
## Hot Exit
By default, VS Code remembers unsaved changes to files when you exit. Hot exit is triggered when the application is closed via **File** > **Exit** (**Code** > **Quit** on macOS) or when the last window is closed.
You can configure hot exit by setting `files.hotExit` to the following values:
You can configure hot exit by setting `setting(files.hotExit)` to the following values:
* `"off"`: Disable hot exit.
* `"onExit"`: Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (from the **Command Palette**, keyboard shortcut or menu). All windows without folders opened will be restored upon next launch.
* `"onExitAndWindowClose"`: Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (from the **Command Palette**, keyboard shortcut or menu), and also for any window with a folder opened regardless of whether it is the last window. All windows without folders opened will be restored upon next launch. To restore folder windows as they were before shutdown, set `window.restoreWindows` to `all`.
* `"onExitAndWindowClose"`: Hot exit will be triggered when the application is closed, that is when the last window is closed on Windows/Linux or when the `workbench.action.quit` command is triggered (from the **Command Palette**, keyboard shortcut or menu), and also for any window with a folder opened regardless of whether it is the last window. All windows without folders opened will be restored upon next launch. To restore folder windows as they were before shutdown, set `setting(window.restoreWindows)` to `all`.
If something goes wrong with hot exit, all backups are stored in the following folders for standard install locations:
@ -123,7 +123,7 @@ When the Find Widget is opened, it will automatically populate the selected text
![Seed Search String From Selection](images/codebasics/seed-search-string-from-selection.gif)
This feature can be turned off by setting `editor.find.seedSearchStringFromSelection` to `"never"`.
This feature can be turned off by setting `setting(editor.find.seedSearchStringFromSelection)` to `"never"`.
### Find In Selection
@ -131,7 +131,7 @@ By default, the find operations are run on the entire file in the editor. It can
![Find In Selection](images/codebasics/find-in-selection.gif)
If you want it to be the default behavior of the Find Widget, you can set `editor.find.autoFindInSelection` to `always`, or to `multiline`, if you want it to be run on selected text only when multiple lines of content are selected.
If you want it to be the default behavior of the Find Widget, you can set `setting(editor.find.autoFindInSelection)` to `always`, or to `multiline`, if you want it to be run on selected text only when multiple lines of content are selected.
### Advanced find and replace options
@ -178,11 +178,11 @@ In the two input boxes below the search box, you can enter patterns to include o
* `[]` to **declare** a range of characters to match (`example.[0-9]` to match on `example.0`, `example.1`, …)
* `[!...]` to negate a range of characters to match (`example.[!0-9]` to match on `example.a`, `example.b`, but not `example.0`)
VS Code excludes some folders by default to reduce the number of search results that you are not interested in (for example: `node_modules`). Open [settings](/docs/getstarted/settings.md) to change these rules under the `files.exclude` and `search.exclude` section.
VS Code excludes some folders by default to reduce the number of search results that you are not interested in (for example: `node_modules`). Open [settings](/docs/getstarted/settings.md) to change these rules under the `setting(files.exclude)` and `setting(search.exclude)` section.
Note that glob patterns in the Search view work differently than in settings such as `files.exclude` and `search.exclude`. In the settings, you must use `**/example` to match a folder named `example` in subfolder `folder1/example` in your workspace. In the Search view, the `**` prefix is assumed. The glob patterns in these settings are always evaluated relative to the path of the workspace folder.
Note that glob patterns in the Search view work differently than in settings such as `setting(files.exclude)` and `setting(search.exclude)`. In the settings, you must use `**/example` to match a folder named `example` in subfolder `folder1/example` in your workspace. In the Search view, the `**` prefix is assumed. The glob patterns in these settings are always evaluated relative to the path of the workspace folder.
Also note the **Use Exclude Settings and Ignore Files** toggle button in the **files to exclude** box. The toggle determines whether to exclude files that are ignored by your `.gitignore` files and/or matched by your `files.exclude` and `search.exclude` settings.
Also note the **Use Exclude Settings and Ignore Files** toggle button in the **files to exclude** box. The toggle determines whether to exclude files that are ignored by your `.gitignore` files and/or matched by your `setting(files.exclude)` and `setting(search.exclude)` settings.
>**Tip:** From the Explorer, you can right-click on a folder and select **Find in Folder** to search inside a folder only.
@ -218,7 +218,7 @@ Below is a search for the word 'SearchEditor' with two lines of text before and
The **Open Search Editor** command opens an existing Search Editor if one exists, or to otherwise create a new one. The **New Search Editor** command will always create a new Search Editor.
In the Search Editor, results can be navigated to using **Go to Definition** actions, such as `kb(editor.action.revealDefinition)` to open the source location in the current editor group, or `kb(editor.action.revealDefinitionAside)` to open the location in an editor to the side. Additionally, you can configure the behavior for single-clicking or double-clicking a search result with the `search.searchEditor.singleClickBehaviour` and `search.searchEditor.doubleClickBehaviour` settings. For example, to open a peek definition window or to open the source location.
In the Search Editor, results can be navigated to using **Go to Definition** actions, such as `kb(editor.action.revealDefinition)` to open the source location in the current editor group, or `kb(editor.action.revealDefinitionAside)` to open the location in an editor to the side. Additionally, you can configure the behavior for single-clicking or double-clicking a search result with the `setting(search.searchEditor.singleClickBehaviour)` and `setting(search.searchEditor.doubleClickBehaviour)` settings. For example, to open a peek definition window or to open the source location.
You can also use the **Open New Search Editor** button at the top of the Search view, and can copy your existing results from a Search view over to a Search Editor with the **Open in editor** link at the top of the results tree, or the **Search Editor: Open Results in Editor** command.
@ -249,11 +249,11 @@ For example, the following keybinding runs the search when the Search Editor is
### Search Editor context default
The `search.searchEditor.defaultNumberOfContextLines` setting has a default value of 1, meaning one context line will be shown before and after each result line in the Search Editor.
The `setting(search.searchEditor.defaultNumberOfContextLines)` setting has a default value of 1, meaning one context line will be shown before and after each result line in the Search Editor.
### Reuse last Search Editor configuration
The `search.searchEditor.reusePriorSearchConfiguration` setting (default is `false`) lets you reuse the last active Search Editor's configuration when creating a new Search Editor.
The `setting(search.searchEditor.reusePriorSearchConfiguration)` setting (default is `false`) lets you reuse the last active Search Editor's configuration when creating a new Search Editor.
## IntelliSense
@ -261,7 +261,7 @@ We'll always offer word completion, but for the rich [languages](/docs/languages
> **Tip:** The suggestions filtering supports CamelCase, so you can type the letters which are upper cased in a method name to limit the suggestions. For example, "cra" will quickly bring up "createApplication".
> **Tip:** IntelliSense suggestions can be configured via the `editor.quickSuggestions` and `editor.suggestOnTriggerCharacters` [settings](/docs/getstarted/settings.md).
> **Tip:** IntelliSense suggestions can be configured via the `setting(editor.quickSuggestions)` and `setting(editor.suggestOnTriggerCharacters)` [settings](/docs/getstarted/settings.md).
JavaScript and TypeScript developers can take advantage of the [npmjs](https://www.npmjs.com) type declaration (typings) file repository to get IntelliSense for common JavaScript libraries (Node.js, React, Angular). You can find a good explanation on using type declaration files in the [JavaScript language](/docs/languages/javascript.md#intellisense) topic and the [Node.js](/docs/nodejs/nodejs-tutorial.md) tutorial.
@ -276,7 +276,7 @@ VS Code has great support for source code formatting. The editor has two explici
You can invoke these from the **Command Palette** (`kb(workbench.action.showCommands)`) or the editor context menu.
VS Code has default formatters for JavaScript, TypeScript, JSON, HTML, and CSS. Each language has specific formatting options (for example, `html.format.indentInnerHtml`) which you can tune to your preference in your user or workspace [settings](/docs/getstarted/settings.md). You can also disable the default language formatter if you have another extension installed that provides formatting for the same language.
VS Code has default formatters for JavaScript, TypeScript, JSON, HTML, and CSS. Each language has specific formatting options (for example, `setting(html.format.indentInnerHtml)`) which you can tune to your preference in your user or workspace [settings](/docs/getstarted/settings.md). You can also disable the default language formatter if you have another extension installed that provides formatting for the same language.
```json
"html.format.enable": false
@ -284,9 +284,9 @@ VS Code has default formatters for JavaScript, TypeScript, JSON, HTML, and CSS.
Along with manually invoking code formatting, you can also trigger formatting based on user gestures such as typing, saving or pasting. These are off by default but you can enable these behaviors through the following [settings](/docs/getstarted/settings.md):
* `editor.formatOnType` - Format the line after typing.
* `editor.formatOnSave` - Format a file on save.
* `editor.formatOnPaste` - Format the pasted content.
* `setting(editor.formatOnType)` - Format the line after typing.
* `setting(editor.formatOnSave)` - Format a file on save.
* `setting(editor.formatOnPaste)` - Format the pasted content.
>Note: Not all formatters support format on paste as to do so they must support formatting a selection or range of text.
@ -356,7 +356,7 @@ Manual folding ranges are especially useful for cases when there isn't programmi
## Indentation
VS Code lets you control text indentation and whether you'd like to use spaces or tab stops. By default, VS Code inserts spaces and uses 4 spaces per `kbstyle(Tab)` key. If you'd like to use another default, you can modify the `editor.insertSpaces` and `editor.tabSize` [settings](/docs/getstarted/settings.md).
VS Code lets you control text indentation and whether you'd like to use spaces or tab stops. By default, VS Code inserts spaces and uses 4 spaces per `kbstyle(Tab)` key. If you'd like to use another default, you can modify the `setting(editor.insertSpaces)` and `setting(editor.tabSize)` [settings](/docs/getstarted/settings.md).
```json
"editor.insertSpaces": true,
@ -373,7 +373,7 @@ You can click on the Status Bar indentation display to bring up a dropdown with
![indentation commands](images/codebasics/indentation-commands.png)
>**Note:** VS Code auto-detection checks for indentations of 2, 4, 6 or 8 spaces. If your file uses a different number of spaces, the indentation may not be correctly detected. For example, if your convention is to indent with 3 spaces, you may want to turn off `editor.detectIndentation` and explicitly set the tab size to 3.
>**Note:** VS Code auto-detection checks for indentations of 2, 4, 6 or 8 spaces. If your file uses a different number of spaces, the indentation may not be correctly detected. For example, if your convention is to indent with 3 spaces, you may want to turn off `setting(editor.detectIndentation)` and explicitly set the tab size to 3.
```json
"editor.detectIndentation": false,
@ -382,7 +382,7 @@ You can click on the Status Bar indentation display to bring up a dropdown with
## File encoding support
Set the file encoding globally or per workspace by using the `files.encoding` setting in **User Settings** or **Workspace Settings**.
Set the file encoding globally or per workspace by using the `setting(files.encoding)` setting in **User Settings** or **Workspace Settings**.
![files.encoding setting](images/codebasics/filesencodingsetting.png)
@ -436,7 +436,7 @@ Yes, expand the Search view text box to include a replace text field. You can se
### How do I turn on word wrap?
You can control word wrap through the `editor.wordWrap` [setting](/docs/getstarted/settings.md). By default, `editor.wordWrap` is `off` but if you set to it to `on`, text will wrap on the editor's viewport width.
You can control word wrap through the `setting(editor.wordWrap)` [setting](/docs/getstarted/settings.md). By default, `setting(editor.wordWrap)` is `off` but if you set to it to `on`, text will wrap on the editor's viewport width.
```json
"editor.wordWrap": "on"
@ -444,7 +444,7 @@ You can control word wrap through the `editor.wordWrap` [setting](/docs/getstart
You can toggle word wrap for the VS Code session with `kb(editor.action.toggleWordWrap)`.
You can also add vertical column rulers to the editor with the `editor.rulers` setting, which takes an array of column character positions where you'd like vertical rulers.
You can also add vertical column rulers to the editor with the `setting(editor.rulers)` setting, which takes an array of column character positions where you'd like vertical rulers.
As in other editors, commands such as **Cut** and **Copy** apply to the whole wrapped line. Triple-click selects the whole wrapped line. Pressing `kbstyle(Home)` twice moves the cursor to the very beginning of the line. Pressing `kbstyle(End)` twice moves the cursor to the very end of the line.

Просмотреть файл

@ -23,7 +23,7 @@ The default (Primary) side bar shows views such as the File Explorer, Search, an
* Right-click the Activity Bar and select **Move Primary Side Bar Right**.
* Run **View: Toggle Primary Side Bar Position** to switch the Primary side bar right and left.
* Set the **Workbench > Side Bar: Location** (`workbench.sideBar.location`) [setting](/docs/getstarted/settings.md) to `right`.
* Set the **Workbench > Side Bar: Location** (`setting(workbench.sideBar.location)`) [setting](/docs/getstarted/settings.md) to `right`.
### Secondary side bar
@ -177,7 +177,7 @@ To navigate between the sides:
* **View: Focus Second Side in Active Editor** - Move focus to the second (right or bottom) side.
* **View: Focus Other Side in Active Editor** - Toggle between the split editor sides.
The **Workbench > Editor: Split in Group Layout** (`workbench.editor.splitInGroupLayout`) [setting](/docs/getstarted/settings.md) lets you set the preferred split editor layout to either horizontal (default) or vertical.
The **Workbench > Editor: Split in Group Layout** (`setting(workbench.editor.splitInGroupLayout)`) [setting](/docs/getstarted/settings.md) lets you set the preferred split editor layout to either horizontal (default) or vertical.
### Grid layout
@ -216,7 +216,7 @@ Pinned tabs help access files that are important to you as:
Unpin an editor by clicking on the pin icon, using the **Unpin** editor tab context menu item, or the **View: Unpin Editor** command.
You can choose how you'd like to display pinned editors with the **Workbench > Editor: Pinned Tab Sizing** (`workbench.editor.pinnedTabSizing`) setting. The options are:
You can choose how you'd like to display pinned editors with the **Workbench > Editor: Pinned Tab Sizing** (`setting(workbench.editor.pinnedTabSizing)`) setting. The options are:
* `normal`: A pinned tab inherits the look of other tabs (default)
* `shrink`: A pinned tab shrinks to a fixed size showing parts of the editor label.
@ -245,7 +245,7 @@ Locked groups behave differently than unlocked groups:
The primary use case is for [terminals in the editor area](/docs/terminal/basics.md#terminals-in-editor-area). For example, you might want to edit text on the left and have a terminal on the right that is always visible. When a terminal editor is created and moved to the side, it will automatically lock. This means that even when the terminal on the right is focused, opening a file will open it on the left side without needing to manually change focus first.
Auto locking groups can be configured using the `workbench.editor.autoLockGroups` setting, which defaults to only terminal editors but any editor type can be added to get the same behavior.
Auto locking groups can be configured using the `setting(workbench.editor.autoLockGroups)` setting, which defaults to only terminal editors but any editor type can be added to get the same behavior.
![Auto Lock Groups setting with Terminal checked in the Settings editor](images/custom-layout/autolockgroup-setting.png)

Просмотреть файл

@ -116,7 +116,7 @@ If you come from a browser Developer Tools background, you might not be used to
The best way to explain the difference between **launch** and **attach** is to think of a **launch** configuration as a recipe for how to start your app in debug mode **before** VS Code attaches to it, while an **attach** configuration is a recipe for how to connect VS Code's debugger to an app or process that's **already** running.
VS Code debuggers typically support launching a program in debug mode or attaching to an already running program in debug mode. Depending on the request (`attach` or `launch`), different attributes are required, and VS Code's `launch.json` validation and suggestions should help with that.
VS Code debuggers typically support launching a program in debug mode or attaching to an already running program in debug mode. Depending on the request (`attach` or `setting(launch)`), different attributes are required, and VS Code's `launch.json` validation and suggestions should help with that.
### Add a new configuration
@ -157,7 +157,7 @@ Once a debug session starts, the **Debug toolbar** will appear on the top of the
| Restart <br> `kb(workbench.action.debug.restart)` | Terminate the current program execution and start debugging again using the current run configuration. |
| Stop <br> `kb(workbench.action.debug.stop)` | Terminate the current program execution. |
>**Tip**: Use the setting `debug.toolBarLocation` to control the location of the debug toolbar. It can be the default `floating`, `docked` to the **Run and Debug** view, or `hidden`. A `floating` debug toolbar can be dragged horizontally and also down to the editor area.
>**Tip**: Use the setting `setting(debug.toolBarLocation)` to control the location of the debug toolbar. It can be the default `floating`, `docked` to the **Run and Debug** view, or `hidden`. A `floating` debug toolbar can be dragged horizontally and also down to the editor area.
### Run mode
@ -179,7 +179,7 @@ The **Reapply All Breakpoints** command sets all breakpoints again to their orig
![Breakpoints](images/debugging/breakpoints.png)
Optionally, breakpoints can be shown in the editor's overview ruler by enabling the setting `debug.showBreakpointsInOverviewRuler`:
Optionally, breakpoints can be shown in the editor's overview ruler by enabling the setting `setting(debug.showBreakpointsInOverviewRuler)`:
![breakpoints in overview ruler](images/debugging/bpts-in-overview.png)
@ -189,7 +189,7 @@ A Logpoint is a variant of a breakpoint that does not "break" into the debugger
A Logpoint is represented by a "diamond" shaped icon. Log messages are plain text but can include expressions to be evaluated within curly braces ('{}').
Add a logpoint with the **Add Logpoint** command in the left editor gutter context menu, or by using the **Debug: Add Logpoint...** command. You can also configure the setting `debug.gutterMiddleClickAction` to toggle a logpoint when pressing the middle mouse button in the editor gutter.
Add a logpoint with the **Add Logpoint** command in the left editor gutter context menu, or by using the **Debug: Add Logpoint...** command. You can also configure the setting `setting(debug.gutterMiddleClickAction)` to toggle a logpoint when pressing the middle mouse button in the editor gutter.
![Logpoints](images/debugging/log-points.gif)
@ -222,7 +222,7 @@ There are many `launch.json` attributes to help support different debuggers and
The following attributes are mandatory for every launch configuration:
* `type` - the type of debugger to use for this launch configuration. Every installed debug extension introduces a type: `node` for the built-in Node debugger, for example, or `php` and `go` for the PHP and Go extensions.
* `request` - the request type of this launch configuration. Currently, `launch` and `attach` are supported.
* `request` - the request type of this launch configuration. Currently, `setting(launch)` and `attach` are supported.
* `name` - the reader-friendly name to appear in the Debug launch configuration dropdown.
Here are some optional attributes available to all launch configurations:

Просмотреть файл

@ -39,15 +39,15 @@ If the current file type has language support for symbols, you will see the curr
![breadcrumb symbol dropdown](images/editingevolved/breadcrumb-symbol-dropdown.png)
You can turn off breadcrumbs with the **View** > **Show Breadcrumbs** toggle or with the `breadcrumbs.enabled` [setting](/docs/getstarted/settings.md).
You can turn off breadcrumbs with the **View** > **Show Breadcrumbs** toggle or with the `setting(breadcrumbs.enabled)` [setting](/docs/getstarted/settings.md).
### Breadcrumb customization
The appearance of breadcrumbs can be customized. If you have very long paths or are only interested in either file paths or symbols paths, you can use the `breadcrumbs.filePath` and `breadcrumbs.symbolPath` settings. Both support `on`, `off`, and `last` and they define if or what part of the path you see. By default, breadcrumbs show file and symbol icons to the left of the breadcrumb but you can remove the icons by setting `breadcrumbs.icons` to false.
The appearance of breadcrumbs can be customized. If you have very long paths or are only interested in either file paths or symbols paths, you can use the `setting(breadcrumbs.filePath)` and `setting(breadcrumbs.symbolPath)` settings. Both support `on`, `off`, and `last` and they define if or what part of the path you see. By default, breadcrumbs show file and symbol icons to the left of the breadcrumb but you can remove the icons by setting `setting(breadcrumbs.icons)` to false.
### Symbol order in Breadcrumbs
You can control how symbols are ordered in the Breadcrumbs dropdown with the `breadcrumbs.symbolSortOrder` settings.
You can control how symbols are ordered in the Breadcrumbs dropdown with the `setting(breadcrumbs.symbolSortOrder)` settings.
Allowed values are:
@ -99,7 +99,7 @@ We think there's nothing worse than a big context switch when all you want is to
You can navigate between different references in the peeked editor and make quick edits right there. Clicking on the peeked editor filename or double-clicking in the result list will open the reference in the outer editor.
> **Tip:** Additionally, the peek window is closed if you press `kbstyle(Escape)` or double-click in the peek editor region. You can disable this behavior with the `editor.stablePeek` [setting](/docs/getstarted/settings.md).
> **Tip:** Additionally, the peek window is closed if you press `kbstyle(Escape)` or double-click in the peek editor region. You can disable this behavior with the `setting(editor.stablePeek)` [setting](/docs/getstarted/settings.md).
## Bracket matching
@ -111,13 +111,13 @@ Matching brackets will be highlighted as soon as the cursor is near one of them.
### Bracket Pair Colorization
Matching bracket pairs can also be colorized by setting `editor.bracketPairColorization.enabled` to `true`.
Matching bracket pairs can also be colorized by setting `setting(editor.bracketPairColorization.enabled)` to `true`.
![Bracket Pair Colorization](images/editingevolved/bracket-pair-colorization-on-off.drawio.png)
All colors are themeable and up to six colors can be configured.
You can use `workbench.colorCustomizations` to override these theme-contributed colors in your settings:
You can use `setting(workbench.colorCustomizations)` to override these theme-contributed colors in your settings:
```json
"workbench.colorCustomizations": {
@ -135,7 +135,7 @@ Some languages like C# support inline reference information, that is updated liv
> **Tip:** Directly invoke the **Peek References** action by clicking on these annotations.
> **Tip:** Reference information shown in CodeLens can be turned on or off through the `editor.codeLens` [setting](/docs/getstarted/settings.md).
> **Tip:** Reference information shown in CodeLens can be turned on or off through the `setting(editor.codeLens)` [setting](/docs/getstarted/settings.md).
## Rename symbol
@ -167,7 +167,7 @@ Some languages provide inlay hints: that is additional information about source
![Inlay hints for inferred types in TypeScript](images/editingevolved/inlay-hints.png)
Inlay hints can be enabled/disabled with the `editor.inlayHints.enabled` setting, the default is enabled. Extensions, like TypeScript or Rust, are needed to provide the actual inlay hint information.
Inlay hints can be enabled/disabled with the `setting(editor.inlayHints.enabled)` setting, the default is enabled. Extensions, like TypeScript or Rust, are needed to provide the actual inlay hint information.
## Outgoing link protection

Просмотреть файл

@ -31,7 +31,7 @@ This setting allows using the `kbstyle(Tab)` key for indentation when text is no
### Emmet when quickSuggestions are disabled
If you have disabled the `editor.quickSuggestions` [setting](/docs/getstarted/settings.md), you won't see suggestions as you type. You can still trigger suggestions manually by pressing `kb(editor.action.triggerSuggest)` and see the preview.
If you have disabled the `setting(editor.quickSuggestions)` [setting](/docs/getstarted/settings.md), you won't see suggestions as you type. You can still trigger suggestions manually by pressing `kb(editor.action.triggerSuggest)` and see the preview.
### Disable Emmet in suggestions
@ -54,7 +54,7 @@ To ensure Emmet suggestions are always on top in the suggestion list, add the fo
## Emmet abbreviations in other file types
To enable the Emmet abbreviation expansion in file types where it is not available by default, use the `emmet.includeLanguages` setting. Make sure to use [language identifiers](/docs/languages/identifiers.md) for both sides of the mapping, with the right side being the language identifier of an Emmet supported language (see the list above).
To enable the Emmet abbreviation expansion in file types where it is not available by default, use the `setting(emmet.includeLanguages)` setting. Make sure to use [language identifiers](/docs/languages/identifiers.md) for both sides of the mapping, with the right side being the language identifier of an Emmet supported language (see the list above).
For example:
@ -72,7 +72,7 @@ Emmet has no knowledge of these new languages, and so there might be Emmet sugge
"emmet.showExpandedAbbreviation": "inMarkupAndStylesheetFilesOnly"
```
> **Note:** If you used `emmet.syntaxProfiles` previously to map new file types, from VS Code 1.15 onwards you should use the setting `emmet.includeLanguages` instead. `emmet.syntaxProfiles` is meant for [customizing the final output](https://docs.emmet.io/customization/syntax-profiles) only.
> **Note:** If you used `setting(emmet.syntaxProfiles)` previously to map new file types, from VS Code 1.15 onwards you should use the setting `setting(emmet.includeLanguages)` instead. `setting(emmet.syntaxProfiles)` is meant for [customizing the final output](https://docs.emmet.io/customization/syntax-profiles) only.
## Emmet with multi-cursors
@ -82,9 +82,9 @@ You can use most of the Emmet actions with multi-cursors as well:
## Using filters
Filters are special post-processors that modify the expanded abbreviation before it is output to the editor. There are 2 ways to use filters; either globally through the `emmet.syntaxProfiles` setting or directly in the current abbreviation.
Filters are special post-processors that modify the expanded abbreviation before it is output to the editor. There are 2 ways to use filters; either globally through the `setting(emmet.syntaxProfiles)` setting or directly in the current abbreviation.
Below is an example of the first approach using the `emmet.syntaxProfiles` setting to apply the `bem` filter for all the abbreviations in HTML files:
Below is an example of the first approach using the `setting(emmet.syntaxProfiles)` setting to apply the `bem` filter for all the abbreviations in HTML files:
```json
"emmet.syntaxProfiles": {
@ -146,7 +146,7 @@ This filter is applicable only when providing abbreviations for the **Emmet: Wra
## Using custom Emmet snippets
Custom Emmet snippets need to be defined in a json file named `snippets.json`. The `emmet.extensionsPath` setting should have the path to the directory containing this file.
Custom Emmet snippets need to be defined in a json file named `snippets.json`. The `setting(emmet.extensionsPath)` setting should have the path to the directory containing this file.
Below is an example for the contents of this `snippets.json` file.
@ -205,7 +205,7 @@ The syntax for tab stops in custom Emmet snippets follows the [Textmate snippets
Below are Emmet [settings](/docs/getstarted/settings.md) that you can use to customize your Emmet experience in VS Code.
* `emmet.includeLanguages`
* `setting(emmet.includeLanguages)`
Use this setting to add mapping between the language of your choice and one of the Emmet supported languages to enable Emmet in the former using the syntax of the latter. Make sure to use language IDs for both sides of the mapping.
@ -218,11 +218,11 @@ Below are Emmet [settings](/docs/getstarted/settings.md) that you can use to cus
}
```
* `emmet.excludeLanguages`
* `setting(emmet.excludeLanguages)`
If there is a language where you do not want to see Emmet expansions, add it in this setting which takes an array of language ID strings.
* `emmet.syntaxProfiles`
* `setting(emmet.syntaxProfiles)`
See [Emmet Customization of output profile](https://docs.emmet.io/customization/syntax-profiles/#create-your-own-profile) to learn how you can customize the output of your HTML abbreviations.
@ -239,7 +239,7 @@ Below are Emmet [settings](/docs/getstarted/settings.md) that you can use to cus
}
```
* `emmet.variables`
* `setting(emmet.variables)`
Customize variables used by Emmet snippets.
@ -252,7 +252,7 @@ Below are Emmet [settings](/docs/getstarted/settings.md) that you can use to cus
}
```
* `emmet.showExpandedAbbreviation`
* `setting(emmet.showExpandedAbbreviation)`
Controls the Emmet suggestions that show up in the suggestion/completion list.
@ -260,32 +260,32 @@ Below are Emmet [settings](/docs/getstarted/settings.md) that you can use to cus
----------- | -------
`never` | Never show Emmet abbreviations in the suggestion list for any language.
`inMarkupAndStylesheetFilesOnly` | Show Emmet suggestions only for languages that are purely markup and stylesheet based ('html', 'pug', 'slim', 'haml', 'xml', 'xsl', 'css', 'scss', 'sass', 'less', 'stylus').
`always` | Show Emmet suggestions in all Emmet supported modes as well as the languages that have a mapping in the `emmet.includeLanguages` setting.
`always` | Show Emmet suggestions in all Emmet supported modes as well as the languages that have a mapping in the `setting(emmet.includeLanguages)` setting.
**Note:** In the `always` mode, the new Emmet implementation is not context aware. For example, if you are editing a JavaScript React file, you will get Emmet suggestions not only when writing markup but also while writing JavaScript.
* `emmet.showAbbreviationSuggestions`
* `setting(emmet.showAbbreviationSuggestions)`
Shows possible emmet abbreviations as suggestions. It is `true` by default.
For example, when you type `li`, you get suggestions for all emmet snippets starting with `li` like `link`, `link:css` , `link:favicon` etc.
This is helpful in learning Emmet snippets that you never knew existed unless you knew the [Emmet cheatsheet](https://docs.emmet.io/cheat-sheet/) by heart.
Not applicable in stylesheets or when `emmet.showExpandedAbbreviation` is set to `never`.
Not applicable in stylesheets or when `setting(emmet.showExpandedAbbreviation)` is set to `never`.
* `emmet.extensionsPath`
* `setting(emmet.extensionsPath)`
Provide the location of the directory that houses the `snippets.json` file which in turn has your custom snippets.
* `emmet.triggerExpansionOnTab`
* `setting(emmet.triggerExpansionOnTab)`
Set this to true to enable expanding Emmet abbreviations with `kbstyle(Tab)` key. We use this setting to provide the appropriate fallback to provide indentation when there is no abbreviation to expand.
* `emmet.showSuggestionsAsSnippets`
* `setting(emmet.showSuggestionsAsSnippets)`
If set to `true`, then Emmet suggestions will be grouped along with other snippets allowing you to order them as per `editor.snippetSuggestions` setting. Set this to `true` and `editor.snippetSuggestions` to `top`, to ensure that Emmet suggestions always show up on top among other suggestions.
If set to `true`, then Emmet suggestions will be grouped along with other snippets allowing you to order them as per `setting(editor.snippetSuggestions)` setting. Set this to `true` and `setting(editor.snippetSuggestions)` to `top`, to ensure that Emmet suggestions always show up on top among other suggestions.
* `emmet.preferences`
* `setting(emmet.preferences)`
You can use this setting to customize Emmet as documented in [Emmet Preferences](https://docs.emmet.io/customization/preferences/). The below customizations are currently supported:
@ -353,7 +353,7 @@ HTML snippets ending with `+` like `select+` and `ul+` from the [Emmet cheatshee
### Abbreviations are failing to expand
First, check if you're using custom snippets (if there is a `snippets.json` file being picked up by the `emmet.extensionsPath` setting). The format of custom snippets changed in VS Code release 1.53. Instead of using `|` to indicate where the cursor position is, use tokens such as `${1}`, `${2}`, etc. instead. The [default CSS snippets file](https://github.com/emmetio/emmet/blob/master/snippets/css.json) from the `emmetio/emmet` repository shows examples of the new cursor position format.
First, check if you're using custom snippets (if there is a `snippets.json` file being picked up by the `setting(emmet.extensionsPath)` setting). The format of custom snippets changed in VS Code release 1.53. Instead of using `|` to indicate where the cursor position is, use tokens such as `${1}`, `${2}`, etc. instead. The [default CSS snippets file](https://github.com/emmetio/emmet/blob/master/snippets/css.json) from the `emmetio/emmet` repository shows examples of the new cursor position format.
If abbreviations are still failing to expand:
@ -362,7 +362,7 @@ If abbreviations are still failing to expand:
### Where can I set all the preferences as documented in [Emmet preferences](https://docs.emmet.io/customization/preferences/)?
You can set the preferences using the setting `emmet.preferences`. Only a subset of the preferences that are documented in [Emmet preferences](https://docs.emmet.io/customization/preferences/) can be customized. Please read the preferences section under [Emmet configuration](/docs/editor/emmet.md#emmet-configuration).
You can set the preferences using the setting `setting(emmet.preferences)`. Only a subset of the preferences that are documented in [Emmet preferences](https://docs.emmet.io/customization/preferences/) can be customized. Please read the preferences section under [Emmet configuration](/docs/editor/emmet.md#emmet-configuration).
### Any tips and tricks?

Просмотреть файл

@ -146,13 +146,13 @@ There is also an **Enable All Extensions** command in the **More Actions** (`...
VS Code checks for extension updates and installs them automatically. After an update, you are prompted to restart the extension host (**Restart Extensions**).
If you'd rather update your extensions manually, you can disable auto-update with the **Disable Auto Update for All Extensions** command or the corresponding action in the Extensions view. You can also configure the `extensions.autoUpdate` [setting](/docs/getstarted/settings.md). Use the **Enable Auto Update for All Extensions** command to re-enable auto update.
If you'd rather update your extensions manually, you can disable auto-update with the **Disable Auto Update for All Extensions** command or the corresponding action in the Extensions view. You can also configure the `setting(extensions.autoUpdate)` [setting](/docs/getstarted/settings.md). Use the **Enable Auto Update for All Extensions** command to re-enable auto update.
![Disable auto update for all extensions action](images/extension-marketplace/disable-auto-update-all-extensions.png)
You can also configure auto update for individual extensions by right-clicking on an extension and toggling the **Auto Update** item.
If you don't want VS Code to even check for updates, you can set the `extensions.autoCheckUpdates` setting to false.
If you don't want VS Code to even check for updates, you can set the `setting(extensions.autoCheckUpdates)` setting to false.
### Update an extension manually
@ -344,8 +344,8 @@ Once downloaded, you can then install the extension via the **Install from VSIX*
Yes, if you would prefer to not have VS Code display extension recommendations in the Extensions view or through notifications, you can modify the following settings:
* `extensions.showRecommendationsOnlyOnDemand` - Set to true to remove the **RECOMMENDED** section.
* `extensions.ignoreRecommendations` - Set to true to silence extension recommendation notifications.
* `setting(extensions.showRecommendationsOnlyOnDemand)` - Set to true to remove the **RECOMMENDED** section.
* `setting(extensions.ignoreRecommendations)` - Set to true to silence extension recommendation notifications.
The **Show Recommended Extensions** command is always available if you want to see recommendations.

Просмотреть файл

@ -27,7 +27,7 @@ VS Code supports the following glob syntax:
## Special cases
Glob patterns in the Search view work differently than in settings such as `files.exclude` and `search.exclude`. In the settings, you must use `**/example` to match a folder named `example` in subfolder `folder1/example` in your workspace. In the Search view, the `**` prefix is assumed. The glob patterns in these settings are always evaluated relative to the path of the workspace folder.
Glob patterns in the Search view work differently than in settings such as `setting(files.exclude)` and `setting(search.exclude)`. In the settings, you must use `**/example` to match a folder named `example` in subfolder `folder1/example` in your workspace. In the Search view, the `**` prefix is assumed. The glob patterns in these settings are always evaluated relative to the path of the workspace folder.
## Common questions

Просмотреть файл

@ -127,7 +127,7 @@ The editor supports "tab completion" which inserts the best matching completion
![Tab Completion](images/intellisense/tabCompletion.gif)
By default, tab completion is disabled. Use the `editor.tabCompletion` setting to enable it. These values exist:
By default, tab completion is disabled. Use the `setting(editor.tabCompletion)` setting to enable it. These values exist:
* `off` - (default) Tab completion is disabled.
* `on` - Tab completion is enabled for all suggestions and repeated invocations insert the next best suggestion.
@ -135,7 +135,7 @@ By default, tab completion is disabled. Use the `editor.tabCompletion` setting t
### Locality Bonus
Sorting of suggestions depends on extension information and on how well they match the current word you are typing. In addition, you can ask the editor to boost suggestions that appear closer to the cursor position, using the `editor.suggest.localityBonus` setting.
Sorting of suggestions depends on extension information and on how well they match the current word you are typing. In addition, you can ask the editor to boost suggestions that appear closer to the cursor position, using the `setting(editor.suggest.localityBonus)` setting.
![Sorted By Locality](images/intellisense/localitybonus.png)
@ -143,9 +143,9 @@ In above images you can see that `count`, `context`, and `colocated` are sorted
### Suggestion selection
By default, VS Code pre-selects the first suggestion in the suggestion list. If you'd like different behavior, for example, to always select the most recently used item in the suggestion list, you can use the `editor.suggestSelection` setting.
By default, VS Code pre-selects the first suggestion in the suggestion list. If you'd like different behavior, for example, to always select the most recently used item in the suggestion list, you can use the `setting(editor.suggestSelection)` setting.
The available `editor.suggestSelection` values are:
The available `setting(editor.suggestSelection)` values are:
* `first` - (default) Always select the top list item.
* `recentlyUsed` - The previously used item is selected unless a prefix (type to select) selects a different item.
@ -159,7 +159,7 @@ When using the last option, `recentlyUsedByPrefix`, VS Code remembers which item
### Snippets in suggestions
By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the `editor.snippetSuggestions` setting. To remove snippets from the suggestions widget, set the value to `"none"`. If you'd like to see snippets, you can specify the order relative to suggestions; at the top (`"top"`), at the bottom (`"bottom"`), or inline ordered alphabetically (`"inline"`). The default is `"inline"`.
By default, VS Code shows snippets and completion proposals in one widget. You can control the behavior with the `setting(editor.snippetSuggestions)` setting. To remove snippets from the suggestions widget, set the value to `"none"`. If you'd like to see snippets, you can specify the order relative to suggestions; at the top (`"top"`), at the bottom (`"bottom"`), or inline ordered alphabetically (`"inline"`). The default is `"inline"`.
### Key bindings

Просмотреть файл

@ -77,7 +77,7 @@ You can delete a profile via the **Delete Profile** command. The **Delete Profil
### Open a new window with a profile
When you open a new VS Code window, the profile used is the one associated with the workspace you are opening or the profile specified in the `window.newWindowProfile` [setting](/docs/getstarted/settings.md).
When you open a new VS Code window, the profile used is the one associated with the workspace you are opening or the profile specified in the `setting(window.newWindowProfile)` [setting](/docs/getstarted/settings.md).
![Configure custom profile for new window](images/profiles/profile-new-window.png)

Просмотреть файл

@ -53,13 +53,13 @@ If you already synced from a machine and turning on sync from another machine, y
## Configuring synced data
Machine settings (with `machine` or `machine-overridable` [scopes](/updates/v1_34.md#machinespecific-settings)) are not synchronized by default, since their values are specific to a given machine. You can also add or remove settings you want to this list from the Settings editor or using the setting `settingsSync.ignoredSettings`.
Machine settings (with `machine` or `machine-overridable` [scopes](/updates/v1_34.md#machinespecific-settings)) are not synchronized by default, since their values are specific to a given machine. You can also add or remove settings you want to this list from the Settings editor or using the setting `setting(settingsSync.ignoredSettings)`.
![Settings Sync ignored settings](images/settings-sync/sync-ignored-settings.png)
Keyboard Shortcuts are synchronized per platform by default. If your keyboard shortcuts are platform-agnostic, you can synchronize them across platforms by disabling the setting `settingsSync.keybindingsPerPlatform`.
Keyboard Shortcuts are synchronized per platform by default. If your keyboard shortcuts are platform-agnostic, you can synchronize them across platforms by disabling the setting `setting(settingsSync.keybindingsPerPlatform)`.
All built-in and installed extensions are synchronized along with their global enablement state. You can skip synchronizing an extension, either from the Extensions view (`kb(workbench.view.extensions)`) or using the setting `settingsSync.ignoredExtensions`.
All built-in and installed extensions are synchronized along with their global enablement state. You can skip synchronizing an extension, either from the Extensions view (`kb(workbench.view.extensions)`) or using the setting `setting(settingsSync.ignoredExtensions)`.
![Settings Sync ignored settings](images/settings-sync/sync-ignored-extensions.png)

Просмотреть файл

@ -77,7 +77,7 @@ While you're viewing your test code in the editor, you can use the play control
![Run and debug tests in editor gutter](images/testing/run-debug-tests-editor-gutter.png)
> **Tip**: you can configure the default testing action for the gutter control by using the `testing.defaultGutterClickAction` setting.
> **Tip**: you can configure the default testing action for the gutter control by using the `setting(testing.defaultGutterClickAction)` setting.
After running a test, the editor gutter displays the test status.
@ -160,12 +160,12 @@ There are multiple settings that you can configure to customize the testing expe
| Setting ID | Details |
|-|-|
| `testing.countBadge` | Controls the count badge on the Testing icon on the Activity Bar |
| `testing.gutterEnabled` | Configure whether to show the test control in the editor gutter |
| `testing.defaultGutterClickAction` | Configure the default action when selecting the gutter test control |
| `testing.coverageBarThresholds` | Configure the colors for the coverage bar thresholds for the Test Coverage view |
| `testing.displayedCoveragePercent` | Configure what percentage value is displayed in the Test Coverage view (total, statement, or minimum) |
| `testing.showCoverageInExplorer` | Configure whether to show the coverage percentage in the Explorer view |
| `setting(testing.countBadge)` | Controls the count badge on the Testing icon on the Activity Bar |
| `setting(testing.gutterEnabled)` | Configure whether to show the test control in the editor gutter |
| `setting(testing.defaultGutterClickAction)` | Configure the default action when selecting the gutter test control |
| `setting(testing.coverageBarThresholds)` | Configure the colors for the coverage bar thresholds for the Test Coverage view |
| `setting(testing.displayedCoveragePercent)` | Configure what percentage value is displayed in the Test Coverage view (total, statement, or minimum) |
| `setting(testing.showCoverageInExplorer)` | Configure whether to show the coverage percentage in the Explorer view |
You can find all testing-related settings in the Settings editor (`kb(workbench.action.openSettings)`).

Просмотреть файл

@ -266,7 +266,7 @@ A consequence of this is that the evaluation of a variable (for example, a comma
### Is variable substitution supported in User and Workspace settings?
The predefined variables are supported in a select number of setting keys in `settings.json` files such as the terminal `cwd`, `env`, `shell` and `shellArgs` values. Some [settings](/docs/getstarted/settings.md) like `window.title` have their own variables:
The predefined variables are supported in a select number of setting keys in `settings.json` files such as the terminal `cwd`, `env`, `shell` and `shellArgs` values. Some [settings](/docs/getstarted/settings.md) like `setting(window.title)` have their own variables:
```json
"window.title": "${dirty}${activeEditorShort}${separator}${rootName}${separator}${appName}"

Просмотреть файл

@ -31,9 +31,9 @@ You can use your voice to talk to [GitHub Copilot Chat](https://marketplace.visu
![Screenshot of the chat input field showing an active microphone icon to enter a voice chat message](images/accessibility/voice-chat.png)
**Note:** when using voice for GitHub Copilot Chat, the chat prompt will automatically submit when you pause. You can configure the time to wait before submitting via the `accessibility.voice.speechTimeout` setting, or disable this functionality when you configure the setting to `0`.
**Note:** when using voice for GitHub Copilot Chat, the chat prompt will automatically submit when you pause. You can configure the time to wait before submitting via the `setting(accessibility.voice.speechTimeout)` setting, or disable this functionality when you configure the setting to `0`.
Copilot Chat also supports text-to-speech capabilities. When you enable the `accessibility.voice.autoSynthesize` setting, Copilot Chat responses are automatically read out aloud when voice was also used as input. To interrupt the synthesis, select the icon or press `kb(workbench.action.speech.stopReadAloud)`.
Copilot Chat also supports text-to-speech capabilities. When you enable the `setting(accessibility.voice.autoSynthesize)` setting, Copilot Chat responses are automatically read out aloud when voice was also used as input. To interrupt the synthesis, select the icon or press `kb(workbench.action.speech.stopReadAloud)`.
Each chat response also shows a new speaker icon, so that you can selectively read out a response aloud.
@ -45,13 +45,13 @@ When using keyboard shortcuts to start voice (`kb(workbench.action.editorDictati
## "Hey Code"
It is possible to enable a mode where VS Code will always listen for the phrase "Hey Code" to start a voice chat session. Configure the `accessibility.voice.keywordActivation` setting accordingly to enable this. When VS Code is listening for "Hey Code", a microphone icon appears in the status bar to indicate as such:
It is possible to enable a mode where VS Code will always listen for the phrase "Hey Code" to start a voice chat session. Configure the `setting(accessibility.voice.keywordActivation)` setting accordingly to enable this. When VS Code is listening for "Hey Code", a microphone icon appears in the status bar to indicate as such:
![Screenshot of a status bar entry to signal active listening to "Hey Code"](images/accessibility/hey-code.png)
## Support for multiple languages
You can select from one of the 26 supported languages by using the `accessibility.voice.speechLanguage` setting. If you set the value to `auto` (default value), the VS Code Speech extension uses the [VS Code display language](/docs/getstarted/locales.md), if that language is available.
You can select from one of the 26 supported languages by using the `setting(accessibility.voice.speechLanguage)` setting. If you set the value to `auto` (default value), the VS Code Speech extension uses the [VS Code display language](/docs/getstarted/locales.md), if that language is available.
Each language for the speech extension comes as its own extension. When you start speech recognition for the first time, you will see an extension installation for each language you selected.

Просмотреть файл

@ -90,11 +90,11 @@ Extension authors can also evaluate their extensions for possible security vulne
Extensions can add custom text to the Extensions view Workspace Trust badge explaining the limitation when running in an untrusted folder.
For example, the VS Code built-in PHP extension limits the use of the `php.validate.executablePath` setting to trusted folders since overriding this setting could run a malicious program.
For example, the VS Code built-in PHP extension limits the use of the `setting(php.validate.executablePath)` setting to trusted folders since overriding this setting could run a malicious program.
![PHP extension limited in Restricted Mode hover](images/workspace-trust/php-limited-hover.png)
You can override an extension's Workspace Trust support level using the `extensions.supportUntrustedWorkspaces` setting described in the [Enabling extensions](#enabling-extensions) section below.
You can override an extension's Workspace Trust support level using the `setting(extensions.supportUntrustedWorkspaces)` setting described in the [Enabling extensions](#enabling-extensions) section below.
If you try to install an extension in Restricted Mode, you will be prompted to either trust the workspace or just install the extension. If the extension doesn't support Workspace Trust, it will be installed, but be disabled or running with limited functionality.
@ -167,7 +167,7 @@ You also group and set trust on your repositories by grouping them under organiz
## Enabling extensions
What happens if you want to use Restricted Mode but your favorite extension doesn't support Workspace Trust? This can happen if an extension, while useful and functional, isn't being actively maintained and hasn't declared their Workspace Trust support. To handle this scenario, you can override the extension's trust state with the `extensions.supportUntrustedWorkspaces` setting.
What happens if you want to use Restricted Mode but your favorite extension doesn't support Workspace Trust? This can happen if an extension, while useful and functional, isn't being actively maintained and hasn't declared their Workspace Trust support. To handle this scenario, you can override the extension's trust state with the `setting(extensions.supportUntrustedWorkspaces)` setting.
>**Note**: Be careful overriding an extension's Workspace Trust support. It may be that the extension author has a good reason for disabling their extension in Restricted Mode. If in doubt, reach out to the extension author or review recent changelogs to get more context.
@ -175,7 +175,7 @@ If you open the Settings editor (`kb(workbench.action.openSettings)`) and search
![Extension support](images/workspace-trust/extensions-support-untrusted.png)
Select that link and you will go to your user `settings.json` file with a new entry for `extensions.supportUntrustedWorkspaces`. This setting takes an object that has a list of extension IDs and their support status and version. You can select any of your installed extensions via IntelliSense suggestions.
Select that link and you will go to your user `settings.json` file with a new entry for `setting(extensions.supportUntrustedWorkspaces)`. This setting takes an object that has a list of extension IDs and their support status and version. You can select any of your installed extensions via IntelliSense suggestions.
Below you can see a `settings.json` entry for the Prettier extension.
@ -198,7 +198,7 @@ If you open a file that is located outside of a trusted folder, VS Code will det
![Untrusted files dialog](images/workspace-trust/untrusted-file-dialog.png)
If you would prefer to not be prompted when opening files from outside trusted workspaces, you can set `security.workspace.trust.untrustedFiles` to `open`. You can also set `security.workspace.trust.untrustedFiles` to `newWindow` to always create a new window in Restricted Mode. Checking the **Remember my decision for all workspaces** option in the untrusted files dialog applies your choice to the `security.workspace.trust.untrustedFiles` user setting.
If you would prefer to not be prompted when opening files from outside trusted workspaces, you can set `setting(security.workspace.trust.untrustedFiles)` to `open`. You can also set `setting(security.workspace.trust.untrustedFiles)` to `newWindow` to always create a new window in Restricted Mode. Checking the **Remember my decision for all workspaces** option in the untrusted files dialog applies your choice to the `setting(security.workspace.trust.untrustedFiles)` user setting.
### Opening untrusted folders
@ -214,18 +214,18 @@ When you open a file, you will be prompted whether you want to open an [untruste
You can switch an empty window to Restricted Mode using the Workspace Trust editor (select **Manage Workspace Trust** from the **Manage** gear button or the Command Palette) and selecting **Don't Trust**. The empty window will remain in Restricted Mode for your current session but will go back to trusted if you restart or create a new window.
If you want all empty windows to be in Restricted Mode, you can set `security.workspace.trust.emptyWindow` to `false`.
If you want all empty windows to be in Restricted Mode, you can set `setting(security.workspace.trust.emptyWindow)` to `false`.
## Settings
Below are the available Workspace Trust settings:
* `security.workspace.trust.enabled` - Enable Workspace Trust feature. Default is true.
* `security.workspace.trust.startupPrompt` - Whether to show the Workspace Trust dialog on startup. Default is to only show once per distinct folder or workspace.
* `security.workspace.trust.emptyWindow` - Whether to always trust an empty window (no open folder). Default is true.
* `security.workspace.trust.untrustedFiles` - Controls how to handle loose files in a workspace. Default is to prompt.
* `extensions.supportUntrustedWorkspaces` - Override extension Workspace Trust declarations. Either true or false.
* `security.workspace.trust.banner` - Controls when the Restricted Mode banner is displayed. Default is `untilDismissed`.
* `setting(security.workspace.trust.enabled)` - Enable Workspace Trust feature. Default is true.
* `setting(security.workspace.trust.startupPrompt)` - Whether to show the Workspace Trust dialog on startup. Default is to only show once per distinct folder or workspace.
* `setting(security.workspace.trust.emptyWindow)` - Whether to always trust an empty window (no open folder). Default is true.
* `setting(security.workspace.trust.untrustedFiles)` - Controls how to handle loose files in a workspace. Default is to prompt.
* `setting(extensions.supportUntrustedWorkspaces)` - Override extension Workspace Trust declarations. Either true or false.
* `setting(security.workspace.trust.banner)` - Controls when the Restricted Mode banner is displayed. Default is `untilDismissed`.
## Command-line switch
@ -265,13 +265,13 @@ Yes, you can still browse and edit source code in Restricted Mode. Some language
In Restricted Mode, any extension that doesn't support Workspace Trust will be disabled, and all UI elements such as Activity bar icons and commands will not be displayed.
You can override an extension's Workspace Trust support level with the `extensions.supportUntrustedWorkspaces` setting but do so with care. [Enabling extensions](#enabling-extensions) has more details.
You can override an extension's Workspace Trust support level with the `setting(extensions.supportUntrustedWorkspaces)` setting but do so with care. [Enabling extensions](#enabling-extensions) has more details.
<!-- List of popular extensions that currently need this override. -->
### Can I disable the Workspace Trust feature?
You can but it is not recommended. If you don't want VS Code to check for Workspace Trust when opening a new folder or repository, you can set `security.workspace.trust.enabled` to false. VS Code will then behave as it did before the 1.57 release.
You can but it is not recommended. If you don't want VS Code to check for Workspace Trust when opening a new folder or repository, you can set `setting(security.workspace.trust.enabled)` to false. VS Code will then behave as it did before the 1.57 release.
### How do I untrust a folder/workspace?

Просмотреть файл

@ -138,7 +138,7 @@ Notice that the line numbers in the editor for the `settings.json` file are now
![settings.json editor with green line numbers](images/settings/color-customization-example.png)
Remove the `workbench.colorCustomizations` setting code block to return the line number color to the default.
Remove the `setting(workbench.colorCustomizations)` setting code block to return the line number color to the default.
>**Note**: The example above changes the editor line number for all [Color Themes](/docs/getstarted/themes.md), but you can tune colors per [specific Color Theme](/docs/getstarted/themes.md#customizing-a-color-theme) or even [create your own Color Theme](/api/extension-guides/color-theme.md#create-a-new-color-theme) extension.
@ -185,13 +185,13 @@ When you add a Workspace Settings `settings.json` file to your project or source
One way to customize language-specific settings is by opening the Settings editor, pressing on the filter button, and selecting the language option to add a language filter. Alternatively, one can directly type a language filter of the form `@lang:languageId` into the search widget. The settings that show up will be configurable for that specific language, and will show the setting value specific to that language, if applicable.
When you modify a setting while there is a language filter in place, the setting is configured in the given scope for that language.
For example, when modifying the user-scope `diffEditor.codeLens` setting while there is a `@lang:css` filter in the search widget, the Settings editor saves the new value to the CSS-specific section of the user settings file.
For example, when modifying the user-scope `setting(diffEditor.codeLens)` setting while there is a `@lang:css` filter in the search widget, the Settings editor saves the new value to the CSS-specific section of the user settings file.
![Editing the CSS-specific user-scoped diffEditor.codeLens setting in the Settings editor](images/settings/settings-css-example.png)
>**Note:** If you enter more than one language filter in the search widget, the current behavior is that only the first language filter will be used.
Another way to customize your editor by language is by running the global command **Preferences: Configure Language Specific Settings** (command ID: `workbench.action.configureLanguageBasedSettings`) from the **Command Palette** (`kb(workbench.action.showCommands)`) which opens the language picker. Select the language you want. Then, the Settings editor opens with a language filter for the selected language, which allows you to modify language-specific settings for that language. Though, if you have the `workbench.settings.editor` setting set to `json`, then the `settings.json` file opens with a new language entry where you can add applicable settings.
Another way to customize your editor by language is by running the global command **Preferences: Configure Language Specific Settings** (command ID: `workbench.action.configureLanguageBasedSettings`) from the **Command Palette** (`kb(workbench.action.showCommands)`) which opens the language picker. Select the language you want. Then, the Settings editor opens with a language filter for the selected language, which allows you to modify language-specific settings for that language. Though, if you have the `setting(workbench.settings.editor)` setting set to `json`, then the `settings.json` file opens with a new language entry where you can add applicable settings.
![Configure language-specific settings command typed up in the Command Palette](images/settings/pref-config-lang-settings.png)
@ -203,7 +203,7 @@ Now you can start editing settings specifically for that language:
![Settings editor showing a specific language filter](images/settings/lang-based-settings-editor.png)
Or, if `workbench.settings.editor` is set to `json`, now you can start adding language-specific settings to your user settings:
Or, if `setting(workbench.settings.editor)` is set to `json`, now you can start adding language-specific settings to your user settings:
![Suggestions for language-specific settings shown in the settings JSON file](images/settings/lang-based-settings.png)
@ -269,7 +269,7 @@ Setting values can be of various types:
Values with primitive types and Array types are overridden, meaning a configured value in a scope that takes precedence over another scope is used instead of the value in the other scope. But, values with Object types are merged.
For example, `workbench.colorCustomizations` takes an Object that specifies a group of UI elements and their desired colors. If your user settings set the editor backgrounds to blue and green:
For example, `setting(workbench.colorCustomizations)` takes an Object that specifies a group of UI elements and their desired colors. If your user settings set the editor backgrounds to blue and green:
```json
"workbench.colorCustomizations": {
@ -309,10 +309,10 @@ Some settings allow you to specify an executable that VS Code will run to perfor
Here is the list of settings not supported in workspace settings:
* `git.path`
* `terminal.external.windowsExec`
* `terminal.external.osxExec`
* `terminal.external.linuxExec`
* `setting(git.path)`
* `setting(terminal.external.windowsExec)`
* `setting(terminal.external.osxExec)`
* `setting(terminal.external.linuxExec)`
The first time you open a workspace that defines any of these settings, VS Code will warn you and then always ignore the values after that.

Просмотреть файл

@ -23,7 +23,7 @@ VS Code and this page refer to three different types of data with respect to tel
## Disable telemetry reporting
With the `telemetry.telemetryLevel` user [setting](/docs/getstarted/settings.md), you can control the different types of telemetry we send with a single setting. Here is a table of the different types of data sent with each value of `telemetry.telemetryLevel`:
With the `setting(telemetry.telemetryLevel)` user [setting](/docs/getstarted/settings.md), you can control the different types of telemetry we send with a single setting. Here is a table of the different types of data sent with each value of `setting(telemetry.telemetryLevel)`:
| | Crash Reports | Error Telemetry | Usage Data |
|:------|:---------------------:|:---------------:|:--------------:|
@ -32,7 +32,7 @@ With the `telemetry.telemetryLevel` user [setting](/docs/getstarted/settings.md)
| crash | ✓ | - | - |
| off | - | - | - |
For example, if you don't want to send any telemetry data to Microsoft, you can set the `telemetry.telemetryLevel` user [setting](/docs/getstarted/settings.md) to `off`.
For example, if you don't want to send any telemetry data to Microsoft, you can set the `setting(telemetry.telemetryLevel)` user [setting](/docs/getstarted/settings.md) to `off`.
From **File** > **Preferences** > **Settings**, search for `telemetry`, and set the **Telemetry: Telemetry Level** setting to `off`. This will silence all telemetry events from VS Code going forward. Telemetry information may have been collected and sent up until the point when you disable the setting.
@ -46,7 +46,7 @@ If you use the JSON editor for your settings, add the following line:
## Extensions and telemetry
VS Code lets you add features to the product by installing Microsoft and third-party extensions. These extensions may be collecting their own usage data and are not controlled by the `telemetry.telemetryLevel` setting. Consult the specific extension's documentation to learn about its telemetry reporting and whether it can be disabled.
VS Code lets you add features to the product by installing Microsoft and third-party extensions. These extensions may be collecting their own usage data and are not controlled by the `setting(telemetry.telemetryLevel)` setting. Consult the specific extension's documentation to learn about its telemetry reporting and whether it can be disabled.
Extension authors may refer to the ["For Extension Authors"](#for-extension-authors) section for guidance on implementing telemetry best practices within their extension.

Просмотреть файл

@ -48,9 +48,9 @@ Alternately, you can search for themes in the Extensions view (`kb(workbench.vie
## Automatically switch based on OS color scheme
Windows and macOS support light and dark color schemes. There is a setting, `window.autoDetectColorScheme`, that instructs VS Code to listen to changes to the OS's color scheme and switch to a matching theme accordingly.
Windows and macOS support light and dark color schemes. There is a setting, `setting(window.autoDetectColorScheme)`, that instructs VS Code to listen to changes to the OS's color scheme and switch to a matching theme accordingly.
Similarly, you can use the `window.autoDetectHighContrast` setting to automatically detect if the OS switched to a high-contrast color scheme.
Similarly, you can use the `setting(window.autoDetectHighContrast)` setting to automatically detect if the OS switched to a high-contrast color scheme.
To customize the themes that are used when a color scheme changes, you can set the preferred light, dark, and high contrast themes in the Settings editor:
@ -65,13 +65,13 @@ To customize the themes that are used when a color scheme changes, you can set t
### Workbench colors
You can customize your active color theme with the `workbench.colorCustomizations` and `editor.tokenColorCustomizations` user [settings](/docs/getstarted/settings.md).
You can customize your active color theme with the `setting(workbench.colorCustomizations)` and `setting(editor.tokenColorCustomizations)` user [settings](/docs/getstarted/settings.md).
To set the colors of VS Code UI elements such as list & trees (File Explorer, suggestions widget), diff editor, Activity Bar, notifications, scroll bar, split view, buttons, and more, use `workbench.colorCustomizations`.
To set the colors of VS Code UI elements such as list & trees (File Explorer, suggestions widget), diff editor, Activity Bar, notifications, scroll bar, split view, buttons, and more, use `setting(workbench.colorCustomizations)`.
![activity bar theming](images/themes/theme-activitybar.gif)
You can use IntelliSense while setting `workbench.colorCustomizations` values or, for a list of all customizable colors, see the [Theme Color Reference](/api/references/theme-color.md).
You can use IntelliSense while setting `setting(workbench.colorCustomizations)` values or, for a list of all customizable colors, see the [Theme Color Reference](/api/references/theme-color.md).
To make customizations to a specific theme, use the following syntax:
@ -106,7 +106,7 @@ If a theme sets a color or border that you don't like, you can use `default` to
### Editor syntax highlighting
To tune the editor's syntax highlighting colors, use `editor.tokenColorCustomizations` in your user [settings](/docs/getstarted/settings.md) `settings.json` file:
To tune the editor's syntax highlighting colors, use `setting(editor.tokenColorCustomizations)` in your user [settings](/docs/getstarted/settings.md) `settings.json` file:
![Token Color Customization](images/themes/token_color_customization.png)
@ -150,7 +150,7 @@ Notice the color differences based on language service symbol understanding:
* line 11: `Range` and `Position` are colored as classes and `document` as a parameter.
* line 13: `getFoldingRanges` is colored as a function.
The settings `editor.semanticHighlighting.enabled` serves as the main control on whether semantic highlighting is applied. It can have values `true`, `false`, and `configuredByTheme`.
The settings `setting(editor.semanticHighlighting.enabled)` serves as the main control on whether semantic highlighting is applied. It can have values `true`, `false`, and `configuredByTheme`.
* `true` and `false` turn semantic highlighting on or off for all themes.
* `configuredByTheme` is the default and lets each theme control whether semantic highlighting is enabled or not. All the themes that ship with VS Code (for example, the "Dark+" default) have semantic highlighting enabled by default.

Просмотреть файл

@ -206,7 +206,7 @@ See more in [Key Bindings for Visual Studio Code](/docs/getstarted/keybindings.m
### Tune your settings
By default, VS Code shows the Settings editor to view and edit settings. You can also edit the underlying `settings.json` file by using the **Open User Settings (JSON)** command or by changing your default settings editor with the `workbench.settings.editor` setting.
By default, VS Code shows the Settings editor to view and edit settings. You can also edit the underlying `settings.json` file by using the **Open User Settings (JSON)** command or by changing your default settings editor with the `setting(workbench.settings.editor)` setting.
Open User Settings `settings.json`
@ -371,7 +371,7 @@ See more in the [JSON](/docs/languages/json.md) documentation.
### Configure the default browser
In VS Code, you can `kbstyle(Ctrl+click)` (`kbstyle(Cmd+click)` on macOS) on a link to open it in your default browser. You can configure the default browser by setting the `workbench.externalBrowser` [setting](/docs/getstarted/settings.md).
In VS Code, you can `kbstyle(Ctrl+click)` (`kbstyle(Cmd+click)` on macOS) on a link to open it in your default browser. You can configure the default browser by setting the `setting(workbench.externalBrowser)` [setting](/docs/getstarted/settings.md).
Specify the full path to the browser executable as the settings value. Alternatively, to ensure correct functioning across devices, you can also use browser aliases, such as `edge`, `chrome`, or `firefox`.
@ -551,7 +551,7 @@ You can add additional cursors to all occurrences of the current selection with
![add cursor to all occurrences of current selection](images/tips-and-tricks/add_cursor_current_selection.gif)
> Note: You can also change the modifier to `kbstyle(Ctrl/Cmd)` for applying multiple cursors with the `editor.multiCursorModifier` [setting](/docs/getstarted/settings.md) . See [Multi-cursor Modifier](/docs/editor/codebasics.md#multicursor-modifier) for details.
> Note: You can also change the modifier to `kbstyle(Ctrl/Cmd)` for applying multiple cursors with the `setting(editor.multiCursorModifier)` [setting](/docs/getstarted/settings.md) . See [Multi-cursor Modifier](/docs/editor/codebasics.md#multicursor-modifier) for details.
If you do not want to add all occurrences of the current selection, you can use `kb(editor.action.addSelectionToNextFindMatch)` instead.
This only selects the next occurrence after the one you selected so you can add selections one by one.
@ -568,7 +568,7 @@ You can also use [keyboard shortcuts](/docs/editor/codebasics.md#column-box-sele
### Vertical rulers
You can add vertical column rulers to the editor with the `editor.rulers` setting, which takes an array of column character positions where you'd like vertical rulers.
You can add vertical column rulers to the editor with the `setting(editor.rulers)` setting, which takes an array of column character positions where you'd like vertical rulers.
```json
{
@ -582,7 +582,7 @@ You can add vertical column rulers to the editor with the `editor.rulers` settin
### Fast scrolling
Pressing the `kbstyle(Alt)` key enables fast scrolling in the editor and Explorers. By default, fast scrolling uses a 5X speed multiplier but you can control the multiplier with the **Editor: Fast Scroll Sensitivity** (`editor.fastScrollSensitivity`) setting.
Pressing the `kbstyle(Alt)` key enables fast scrolling in the editor and Explorers. By default, fast scrolling uses a 5X speed multiplier but you can control the multiplier with the **Editor: Fast Scroll Sensitivity** (`setting(editor.fastScrollSensitivity)`) setting.
### Locked scrolling
@ -1019,11 +1019,11 @@ For example, to bind `kbstyle(Ctrl+H)` to the `Run tests` task, add the followin
### Run npm scripts as tasks from the Explorer
From the Explorer view you can open a script in the editor, run it as a task, and launch it with the node debugger (when the script defines a debug option like `--inspect-brk`). The default action on click is to open the script. To run a script on a single click, set `npm.scriptExplorerAction` to `run`. Use the setting `npm.exclude` to exclude scripts in `package.json` files contained in particular folders.
From the Explorer view you can open a script in the editor, run it as a task, and launch it with the node debugger (when the script defines a debug option like `--inspect-brk`). The default action on click is to open the script. To run a script on a single click, set `setting(npm.scriptExplorerAction)` to `run`. Use the setting `setting(npm.exclude)` to exclude scripts in `package.json` files contained in particular folders.
![Filter problems](images/tips-and-tricks/script_explorer.png)
With the setting `npm.enableRunFromFolder`, you can enable to run npm scripts from the Explorer view context menu for a folder. The setting enables the command **Run NPM Script in Folder...** when a folder is selected. The command shows a Quick Pick list of the npm scripts contained in this folder and you can select the script to be executed as a task.
With the setting `setting(npm.enableRunFromFolder)`, you can enable to run npm scripts from the Explorer view context menu for a folder. The setting enables the command **Run NPM Script in Folder...** when a folder is selected. The command shows a Quick Pick list of the npm scripts contained in this folder and you can select the script to be executed as a task.
## Portable mode

Просмотреть файл

@ -46,7 +46,7 @@ You can open as many editors as you like side by side vertically and horizontall
When you open another file, the editor that is active will display the content of that file. If you have two editors side by side and you want to open file 'foo.cs' into the right-hand editor, make sure that this editor is active (by clicking inside it) before opening file 'foo.cs'.
By default, editors open to the right-hand side of the active one. You can change this behavior with the `workbench.editor.openSideBySideDirection` setting to open new editors to the bottom of the active one instead.
By default, editors open to the right-hand side of the active one. You can change this behavior with the `setting(workbench.editor.openSideBySideDirection)` setting to open new editors to the bottom of the active one instead.
When you have more than one editor open, you can switch between them quickly by holding the `kbstyle(Ctrl)` key (`kbstyle(Cmd)` on macOS) and pressing `kbstyle(1)`, `kbstyle(2)`, or `kbstyle(3)`.
@ -90,7 +90,7 @@ Sticky Scroll shows the starting lines of currently visible nested scopes at the
>**Tip:** You can enable/disable Sticky Scroll with the `"editor.stickyScroll.enabled"` setting.
Sticky Scroll uses several different content models to create its headings. It is possible to choose between the outline provider model, the folding provider model, and the indentation model to determine which lines to display in the Sticky Scroll area. If a model is not available for the current language, VS Code falls back to the next model in the order given above. The default model initially used comes from the `editor.stickyScroll.defaultModel` setting.
Sticky Scroll uses several different content models to create its headings. It is possible to choose between the outline provider model, the folding provider model, and the indentation model to determine which lines to display in the Sticky Scroll area. If a model is not available for the current language, VS Code falls back to the next model in the order given above. The default model initially used comes from the `setting(editor.stickyScroll.defaultModel)` setting.
### Indent Guides
@ -114,7 +114,7 @@ After you open a folder in VS Code, the contents of the folder are shown in the
* Move files and folders with drag and drop.
* Use the context menu to explore all options.
>**Tip:** You can drag and drop files into the Explorer view from outside VS Code to copy them. If the explorer is empty, VS Code opens the files instead. You can also copy-paste files from outside VS Code into the Explorer view. With the `explorer.autoOpenDroppedFile` setting, you to configure whether to automatically open the file or not.
>**Tip:** You can drag and drop files into the Explorer view from outside VS Code to copy them. If the explorer is empty, VS Code opens the files instead. You can also copy-paste files from outside VS Code into the Explorer view. With the `setting(explorer.autoOpenDroppedFile)` setting, you to configure whether to automatically open the file or not.
VS Code works well with other tools that you might use, especially command-line tools. If you want to run a command-line tool in the context of the folder you currently have open in VS Code, right-click the folder and select **Open in Integrated Terminal**.
@ -122,7 +122,7 @@ You can also navigate to the location of a file or folder in the native operatin
>**Tip:** Type `kb(workbench.action.quickOpen)` (**Quick Open**) to quickly search and open a file by its name.
By default, VS Code excludes some folders from showing in the Explorer view, such as `.git`. Use the `files.exclude` [setting](/docs/getstarted/settings.md) to configure rules for hiding files and folders from the Explorer view.
By default, VS Code excludes some folders from showing in the Explorer view, such as `.git`. Use the `setting(files.exclude)` [setting](/docs/getstarted/settings.md) to configure rules for hiding files and folders from the Explorer view.
>**Tip:** You can hide derived resources files, like `*.meta` in Unity, or `*.js` in a TypeScript project. For Unity to exclude the `*.cs.meta` files, the pattern to choose would be: `"**/*.cs.meta": true`. For TypeScript, you can exclude generated JavaScript for TypeScript files with: `"**/*.js": {"when": "$(basename).ts"}`.
@ -130,7 +130,7 @@ By default, VS Code excludes some folders from showing in the Explorer view, suc
You can select multiple files in the Explorer view and Open Editors section to run actions (delete, drag and drop, or open to the side) on multiple items. Hold `kbstyle(Ctrl)` (`kbstyle(Cmd)` on macOS) and select individual files, or hold `kbstyle(Shift)` to select a range of files. If you select two items, you can now also use the context menu **Compare Selected** command to quickly diff two files.
**Note:** In earlier VS Code releases, clicking with the `kbstyle(Ctrl)` (`kbstyle(Cmd)` on macOS) key pressed, would open a file in a new editor group to the side. If you still want this behavior, you can use the `workbench.list.multiSelectModifier` setting to change multi-selection to use the `kbstyle(Alt)` key.
**Note:** In earlier VS Code releases, clicking with the `kbstyle(Ctrl)` (`kbstyle(Cmd)` on macOS) key pressed, would open a file in a new editor group to the side. If you still want this behavior, you can use the `setting(workbench.list.multiSelectModifier)` setting to change multi-selection to use the `kbstyle(Alt)` key.
```json
"workbench.list.multiSelectModifier": "alt"
@ -202,9 +202,9 @@ VS Code gives you many options to configure the editor. From the **View** > **Ap
### Hide the menu bar (Windows, Linux)
You can hide the menu bar on Windows and Linux by changing the setting `window.menuBarVisibility` from `classic` to `toggle` or `hidden`. A setting of `toggle` means that a single press of the `kbstyle(Alt)` key shows the menu bar again.
You can hide the menu bar on Windows and Linux by changing the setting `setting(window.menuBarVisibility)` from `classic` to `toggle` or `hidden`. A setting of `toggle` means that a single press of the `kbstyle(Alt)` key shows the menu bar again.
You can also hide the menu bar on Windows and Linux with the **View: Toggle Menu Bar** command. This command sets `window.menuBarVisibility` from `classic` to `compact`, resulting in the menu bar moving into the Activity Bar. To return the menu bar to the `classic` position, you can run the **View: Toggle Menu Bar** command again.
You can also hide the menu bar on Windows and Linux with the **View: Toggle Menu Bar** command. This command sets `setting(window.menuBarVisibility)` from `classic` to `compact`, resulting in the menu bar moving into the Activity Bar. To return the menu bar to the `classic` position, you can run the **View: Toggle Menu Bar** command again.
### Settings
@ -220,18 +220,18 @@ Alternately, you can modify the user settings directly in the `settings.json` fi
### Zen Mode
Zen mode lets you focus on your code by hiding all UI elements, except for the editor, switching VS Code to full screen, and centering the editor. Zen mode can be toggled with the **View** > **Appearance** > **Zen Mode** menu, **View: Toggle Zen Mode** in the **Command Palette**, or with the shortcut `kb(workbench.action.toggleZenMode)`. Double press `kbstyle(Esc)` to exit Zen mode. The transition to full screen can be disabled via `zenMode.fullScreen`.
Zen mode lets you focus on your code by hiding all UI elements, except for the editor, switching VS Code to full screen, and centering the editor. Zen mode can be toggled with the **View** > **Appearance** > **Zen Mode** menu, **View: Toggle Zen Mode** in the **Command Palette**, or with the shortcut `kb(workbench.action.toggleZenMode)`. Double press `kbstyle(Esc)` to exit Zen mode. The transition to full screen can be disabled via `setting(zenMode.fullScreen)`.
Zen Mode can be further tuned with the following settings:
* `zenMode.hideActivityBar`- Hide the Activity bar. Default `true`.
* `zenMode.hideStatusBar` - Hide the Status bar. Default `true`.
* `zenMode.hideLineNumbers` - Hide line numbers. Default `true`.
* `zenMode.showTabs` - Controls whether to show multiple, single, or no editors tabs. Default `multiple`.
* `zenMode.fullScreen` - Put workbench in full screen display. Default `true`.
* `zenMode.restore` - Restore Zen Mode on restart. Default `true`.
* `zenMode.centerLayout` - Use [Centered editor layout](#centered-editor-layout). Default `true`.
* `zenMode.silentNotifications` - Do not display notifications. Default `true`.
* `setting(zenMode.hideActivityBar)`- Hide the Activity bar. Default `true`.
* `setting(zenMode.hideStatusBar)` - Hide the Status bar. Default `true`.
* `setting(zenMode.hideLineNumbers)` - Hide line numbers. Default `true`.
* `setting(zenMode.showTabs)` - Controls whether to show multiple, single, or no editors tabs. Default `multiple`.
* `setting(zenMode.fullScreen)` - Put workbench in full screen display. Default `true`.
* `setting(zenMode.restore)` - Restore Zen Mode on restart. Default `true`.
* `setting(zenMode.centerLayout)` - Use [Centered editor layout](#centered-editor-layout). Default `true`.
* `setting(zenMode.silentNotifications)` - Do not display notifications. Default `true`.
### Centered Editor Layout
@ -247,9 +247,9 @@ You can drag and drop tabs to reorder them. To perform an action on multiple tab
When you have more open items than can fit in the title area, you can use the **Open Editors** section in the Explorer view (available through the `...` button) to display a dropdown list of tabbed items.
There is also a scroll bar between the tab and editor regions to drag editors into view. You can increase the height of the scroll bar to make it easier to drag by setting **Workbench > Editor: Title Scrollbar Sizing** (`workbench.editor.titleScrollbarSizing`) to `large`.
There is also a scroll bar between the tab and editor regions to drag editors into view. You can increase the height of the scroll bar to make it easier to drag by setting **Workbench > Editor: Title Scrollbar Sizing** (`setting(workbench.editor.titleScrollbarSizing)`) to `large`.
If you don't want to use tabs, you can disable the feature by setting the `workbench.editor.showTabs` [setting](/docs/getstarted/settings.md) to `single`:
If you don't want to use tabs, you can disable the feature by setting the `setting(workbench.editor.showTabs)` [setting](/docs/getstarted/settings.md) to `single`:
```json
"workbench.editor.showTabs": "single"
@ -261,7 +261,7 @@ See the section below to optimize VS Code for [working without Tabs](/docs/getst
### Tab ordering
By default, new tabs are added to the right of the existing tabs. You can control where you want new tabs to appear with the `workbench.editor.openPositioning` setting.
By default, new tabs are added to the right of the existing tabs. You can control where you want new tabs to appear with the `setting(workbench.editor.openPositioning)` setting.
For example, you might like new tabbed items to appear on the left:
@ -275,7 +275,7 @@ If you'd like an editor tab to always be visible, you can pin it to the editor t
### Wrapped tabs
To see more editor tabs, you can use the **wrapped tab** layout, where editor tabs wrap to fill multiple rows above the editor region. Enable wrapped tabs with the **Workbench > Editor: Wrap Tabs** (`workbench.editor.wrapTabs`) [setting](/docs/getstarted/settings.md).
To see more editor tabs, you can use the **wrapped tab** layout, where editor tabs wrap to fill multiple rows above the editor region. Enable wrapped tabs with the **Workbench > Editor: Wrap Tabs** (`setting(workbench.editor.wrapTabs)`) [setting](/docs/getstarted/settings.md).
![Wrapped editor tabs filling two rows about the editor region](images/userinterface/wrapped-tabs.png)
@ -283,13 +283,13 @@ To see more editor tabs, you can use the **wrapped tab** layout, where editor ta
When you have multiple files with the same name open at the same time, it can be difficult to distinguish the different tabs. To help with this, you can apply a custom display label to the tabs. You can choose for which files in your workspace you want to apply a custom label to the tab.
To enable custom display labels for tabs, set the `workbench.editor.customLabels.enabled` setting:
To enable custom display labels for tabs, set the `setting(workbench.editor.customLabels.enabled)` setting:
```json
"workbench.editor.customLabels.enabled": true
```
You can specify one or more naming patterns for the tab display labels with the `workbench.editor.customLabels.patterns` setting. A name pattern consists of two components:
You can specify one or more naming patterns for the tab display labels with the `setting(workbench.editor.customLabels.patterns)` setting. A name pattern consists of two components:
- **Item** - a [glob pattern](/docs/editor/glob-patterns.md) that matches file paths for which to apply a custom label. For example, `**/static/**/*.html`.
- **Value** - a template for the custom label. Templates can use variables such as `${filename}`, `${extname}`, `${extname(N)}`, `${dirname}`, and `${dirname(N)}`, which are dynamically replaced with values from the file's path.
@ -325,8 +325,8 @@ Preview mode is indicated by italics in the tab heading:
If you prefer not to use preview mode and always create a new tab, you can control the behavior with these settings:
* `workbench.editor.enablePreview` - to globally enable or disable preview editors
* `workbench.editor.enablePreviewFromQuickOpen` - to enable or disable preview editors when opened from **Quick Open**
* `setting(workbench.editor.enablePreview)` - to globally enable or disable preview editors
* `setting(workbench.editor.enablePreviewFromQuickOpen)` - to enable or disable preview editors when opened from **Quick Open**
## Grid editor layout
@ -370,11 +370,11 @@ Here are some handy keyboard shortcuts to quickly navigate between editors and e
## Working without tabs
If you prefer not to use tabs (tabbed headings), you can disable tabs entirely by setting `workbench.editor.showTabs` to `single` or `none`.
If you prefer not to use tabs (tabbed headings), you can disable tabs entirely by setting `setting(workbench.editor.showTabs)` to `single` or `none`.
### Disable Preview mode
Without tabs, the **Open Editors** section of the Explorer view is a quick way to do file navigation. However, with [preview editor mode](/docs/getstarted/userinterface.md#preview-mode) enabled, files are not added to the Open Editors section. You can disable this feature through the `workbench.editor.enablePreview` and `workbench.editor.enablePreviewFromQuickOpen` settings.
Without tabs, the **Open Editors** section of the Explorer view is a quick way to do file navigation. However, with [preview editor mode](/docs/getstarted/userinterface.md#preview-mode) enabled, files are not added to the Open Editors section. You can disable this feature through the `setting(workbench.editor.enablePreview)` and `setting(workbench.editor.enablePreviewFromQuickOpen)` settings.
### Use keyboard shortcuts to navigate the editor history
@ -407,13 +407,13 @@ Windows/Linux:
VS Code has various options to control how VS Code windows (instances) should be opened or restored between sessions.
The settings `window.openFoldersInNewWindow` and `window.openFilesInNewWindow` are provided to configure opening new windows or reusing the last active window for files or folders and possible values are `default`, `on` and `off`.
The settings `setting(window.openFoldersInNewWindow)` and `setting(window.openFilesInNewWindow)` are provided to configure opening new windows or reusing the last active window for files or folders and possible values are `default`, `on` and `off`.
If configured to be `default`, VS Code decides about reusing or opening a new window, based on the context from where the open request was made. Flip this to `on` or `off` to always behave the same. For example, if you feel that picking a file or folder from the **File** menu should always open in a new window, set this to `on`.
> **Note**: There are cases where this setting is ignored, such as when you use the `-new-window` or `-reuse-window` command-line option.
The `window.restoreWindows` setting informs VS Code about how to restore the opened windows of your previous session. By default, VS Code restores all windows you worked on during your previous session (setting: `all`). Change this setting to `none` to never reopen any windows and always start with an empty VS Code instance. Change it to `one` to reopen the last opened window you worked on, or to `folders` to only restore windows that had folders opened.
The `setting(window.restoreWindows)` setting informs VS Code about how to restore the opened windows of your previous session. By default, VS Code restores all windows you worked on during your previous session (setting: `all`). Change this setting to `none` to never reopen any windows and always start with an empty VS Code instance. Change it to `one` to reopen the last opened window you worked on, or to `folders` to only restore windows that had folders opened.
## Next steps
@ -426,7 +426,7 @@ Now that you know the overall layout of VS Code, start to customize the editor t
### How can I change the color of the indent guides?
The indent guide colors are customizable, as are most VS Code user interface elements. To [customize](/api/references/theme-color.md) the indent guides color for your active Color Theme, use the `workbench.colorCustomizations` [setting](/docs/getstarted/settings.md) and modify the `editorIndentGuide.background` value.
The indent guide colors are customizable, as are most VS Code user interface elements. To [customize](/api/references/theme-color.md) the indent guides color for your active Color Theme, use the `setting(workbench.colorCustomizations)` [setting](/docs/getstarted/settings.md) and modify the `editorIndentGuide.background` value.
For example, to make the indent guides bright blue, add the following to your `settings.json`:

Просмотреть файл

@ -101,7 +101,7 @@ Another cool feature is the ability to see the number of references to a method
![CodeLens](images/csharp/codelens.png)
>**Tip:** You can turn off references information displayed in CodeLens with the `editor.codeLens` [setting](/docs/getstarted/settings.md).
>**Tip:** You can turn off references information displayed in CodeLens with the `setting(editor.codeLens)` [setting](/docs/getstarted/settings.md).
## Find References/Peek Definition

Просмотреть файл

@ -100,7 +100,7 @@ There is jump to definition for `@import` and `url()` links in CSS, SCSS and Les
## CSS custom data
You can extend VS Code's CSS support through a declarative [custom data format](https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md). By setting `css.customData` to a list of JSON files following the custom data format, you can enhance VS Code's understanding of new CSS properties, at-directives, pseudo-classes and pesudo-elements. VS Code will then offer language support such as completion & hover information for the provided properties, at-directives, pseudo-classes and pesudo-elements.
You can extend VS Code's CSS support through a declarative [custom data format](https://github.com/microsoft/vscode-css-languageservice/blob/main/docs/customData.md). By setting `setting(css.customData)` to a list of JSON files following the custom data format, you can enhance VS Code's understanding of new CSS properties, at-directives, pseudo-classes and pesudo-elements. VS Code will then offer language support such as completion & hover information for the provided properties, at-directives, pseudo-classes and pesudo-elements.
You can read more about using custom data in the [vscode-custom-data](https://github.com/microsoft/vscode-custom-data) repository.
@ -108,10 +108,10 @@ You can read more about using custom data in the [vscode-custom-data](https://gi
The CSS Languages Features extension also provides a formatter. The formatter works with CSS, LESS and SCSS. It is implemented by the [JS Beautify library](https://github.com/beautify-web/js-beautify) and comes with the following settings:
* `css.format.enable` - Enable/disable default CSS formatter.
* `css.format.newlineBetweenRules` - Separate rulesets by a blank line.
* `css.format.newlineBetweenSelectors` - Separate selectors with a new line.
* `css.format.spaceAroundSelectorSeparator` - Ensure a space character around selector separators '>', '+', '~' (for example, `a > b`).
* `setting(css.format.enable)` - Enable/disable default CSS formatter.
* `setting(css.format.newlineBetweenRules)` - Separate rulesets by a blank line.
* `setting(css.format.newlineBetweenSelectors)` - Separate selectors with a new line.
* `setting(css.format.spaceAroundSelectorSeparator)` - Ensure a space character around selector separators '>', '+', '~' (for example, `a > b`).
The same settings also exist for `less` and `scss`.

Просмотреть файл

@ -78,7 +78,7 @@ You can add additional lint checks using the `go.lintOnSave` setting and configu
You can format your Go file using `kb(editor.action.formatDocument)` or by running the **Format Document** command from the Command Palette or the context menu in the editor.
By default, formatting is run when you save your Go file. You can disable this behavior by setting `editor.formatOnSave` to `false` for the `[go]` language identifier. You can change this using your JSON setting files.
By default, formatting is run when you save your Go file. You can disable this behavior by setting `setting(editor.formatOnSave)` to `false` for the `[go]` language identifier. You can change this using your JSON setting files.
```json
"[go]": {

Просмотреть файл

@ -103,14 +103,14 @@ To improve the formatting of your HTML source code, you can use the **Format Doc
The HTML formatter is based on [js-beautify](https://www.npmjs.com/package/js-beautify). The formatting options offered by that library are surfaced in the VS Code [settings](/docs/getstarted/settings.md):
* `html.format.wrapLineLength`: Maximum amount of characters per line.
* `html.format.unformatted`: List of tags that shouldn't be reformatted.
* `html.format.contentUnformatted`: List of tags, comma separated, where the content shouldn't be reformatted.
* `html.format.extraLiners`: List of tags that should have an extra newline before them.
* `html.format.preserveNewLines`: Whether existing line breaks before elements should be preserved.
* `html.format.maxPreserveNewLines`: Maximum number of line breaks to be preserved in one chunk.
* `html.format.indentInnerHtml`: Indent `<head>` and `<body>` sections.
* `html.format.wrapAttributes`: Wrapping strategy for attributes:
* `setting(html.format.wrapLineLength)`: Maximum amount of characters per line.
* `setting(html.format.unformatted)`: List of tags that shouldn't be reformatted.
* `setting(html.format.contentUnformatted)`: List of tags, comma separated, where the content shouldn't be reformatted.
* `setting(html.format.extraLiners)`: List of tags that should have an extra newline before them.
* `setting(html.format.preserveNewLines)`: Whether existing line breaks before elements should be preserved.
* `setting(html.format.maxPreserveNewLines)`: Maximum number of line breaks to be preserved in one chunk.
* `setting(html.format.indentInnerHtml)`: Indent `<head>` and `<body>` sections.
* `setting(html.format.wrapAttributes)`: Wrapping strategy for attributes:
* `auto`: Wrap when the line length is exceeded
* `force`: Wrap all attributes, except first
* `force-aligned`: Wrap all attributes, except first, and align attributes
@ -118,11 +118,11 @@ The HTML formatter is based on [js-beautify](https://www.npmjs.com/package/js-be
* `aligned-multiple`: Wrap when line length is exceeded, align attributes vertically
* `preserve`: Preserve wrapping of attributes
* `preserve-aligned`: Preserve wrapping of attributes but align
* `html.format.wrapAttributesIndentSize`: Alignment size when using `force aligned` and `aligned multiple` in `html.format.wrapAttributes` or `null` to use the default indent size.
* `html.format.templating`: Honor django, erb, handlebars and php templating language tags.
* `html.format.unformattedContentDelimiter`: Keep text content together between this string.
* `setting(html.format.wrapAttributesIndentSize)`: Alignment size when using `force aligned` and `aligned multiple` in `setting(html.format.wrapAttributes)` or `null` to use the default indent size.
* `setting(html.format.templating)`: Honor django, erb, handlebars and php templating language tags.
* `setting(html.format.unformattedContentDelimiter)`: Keep text content together between this string.
>**Tip:** The formatter doesn't format the tags listed in the `html.format.unformatted` and `html.format.contentUnformatted` settings. Embedded JavaScript is formatted unless 'script' tags are excluded.
>**Tip:** The formatter doesn't format the tags listed in the `setting(html.format.unformatted)` and `setting(html.format.contentUnformatted)` settings. Embedded JavaScript is formatted unless 'script' tags are excluded.
The Marketplace has several alternative formatters to choose from. If you want to use a different formatter, define
`"html.format.enable": false` in your settings to turn off the built-in formatter.
@ -135,7 +135,7 @@ VS Code supports [Emmet snippet](https://emmet.io/) expansion. Emmet abbreviatio
>**Tip:** See the HTML section of the [Emmet cheat sheet](https://docs.emmet.io/cheat-sheet) for valid abbreviations.
If you'd like to use HTML Emmet abbreviations with other languages, you can associate one of the Emmet modes (such as `css`, `html`) with other languages with the `emmet.includeLanguages` [setting](/docs/getstarted/settings.md). The setting takes a [language identifier](/docs/languages/overview.md#language-identifier) and associates it with the language ID of an Emmet supported mode.
If you'd like to use HTML Emmet abbreviations with other languages, you can associate one of the Emmet modes (such as `css`, `html`) with other languages with the `setting(emmet.includeLanguages)` [setting](/docs/getstarted/settings.md). The setting takes a [language identifier](/docs/languages/overview.md#language-identifier) and associates it with the language ID of an Emmet supported mode.
For example, to use Emmet HTML abbreviations inside JavaScript:
@ -151,7 +151,7 @@ We also support [User Defined Snippets](/docs/editor/userdefinedsnippets.md).
## HTML custom data
You can extend VS Code's HTML support through a declarative [custom data format](https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md). By setting `html.customData` to a list of JSON files following the custom data format, you can enhance VS Code's understanding of new HTML tags, attributes and attribute values. VS Code will then offer language support such as completion & hover information for the provided tags, attributes and attribute values.
You can extend VS Code's HTML support through a declarative [custom data format](https://github.com/microsoft/vscode-html-languageservice/blob/main/docs/customData.md). By setting `setting(html.customData)` to a list of JSON files following the custom data format, you can enhance VS Code's understanding of new HTML tags, attributes and attribute values. VS Code will then offer language support such as completion & hover information for the provided tags, attributes and attribute values.
You can read more about using custom data in the [vscode-custom-data](https://github.com/microsoft/vscode-custom-data) repository.

Просмотреть файл

@ -65,7 +65,7 @@ VS Code includes basic JavaScript [snippets](/docs/editor/userdefinedsnippets.md
There are many extensions that provide additional snippets, including snippets for popular frameworks such as Redux or Angular. You can even [define your own snippets](/docs/editor/userdefinedsnippets.md).
> **Tip**: To disable snippets suggestions, set `editor.snippetSuggestions` to `"none"` in your [settings](/docs/getstarted/settings.md) file. The `editor.snippetSuggestions` setting also lets you change where snippets appear in the suggestions: at the top (`"top"`), at the bottom (`"bottom"`), or inlined ordered alphabetically (`"inline"`). The default is `"inline"`.
> **Tip**: To disable snippets suggestions, set `setting(editor.snippetSuggestions)` to `"none"` in your [settings](/docs/getstarted/settings.md) file. The `setting(editor.snippetSuggestions)` setting also lets you change where snippets appear in the suggestions: at the top (`"top"`), at the bottom (`"bottom"`), or inlined ordered alphabetically (`"inline"`). The default is `"inline"`.
## JSDoc support
@ -115,7 +115,7 @@ In this example, VS Code adds an import for `Button` from [material-ui](https://
To disable auto imports, set `"javascript.suggest.autoImports"` to `false`.
> **Tip:** VS Code tries to infer the best import style to use. You can explicitly configure the preferred quote style and path style for imports added to your code with the `javascript.preferences.quoteStyle` and `javascript.preferences.importModuleSpecifier` settings.
> **Tip:** VS Code tries to infer the best import style to use. You can explicitly configure the preferred quote style and path style for imports added to your code with the `setting(javascript.preferences.quoteStyle)` and `setting(javascript.preferences.importModuleSpecifier)` settings.
## Formatting
@ -176,7 +176,7 @@ Available refactorings include:
See [Refactorings](/docs/editor/refactoring.md) for more information about refactorings and how you can configure keyboard shortcuts for individual refactorings.
Additionally, **Code Action Widget: Include Nearby Quick Fixes** (`editor.codeActionWidget.includeNearbyQuickFixes`) is a setting that is enabled on default, which will activate the nearest Quick Fix in a line from `kb(editor.action.quickFix)` (command ID `editor.action.quickFix`), no matter where your cursor is in that line.
Additionally, **Code Action Widget: Include Nearby Quick Fixes** (`setting(editor.codeActionWidget.includeNearbyQuickFixes)`) is a setting that is enabled on default, which will activate the nearest Quick Fix in a line from `kb(editor.action.quickFix)` (command ID `editor.action.quickFix`), no matter where your cursor is in that line.
The command highlights the source code that will be refactored or fixed with Quick Fixes. Normal Code Actions and non-fix refactorings can still be activated at the cursor location.
@ -220,7 +220,7 @@ Organize imports can also be done automatically when you save a JavaScript file
## Code Actions on Save
The `editor.codeActionsOnSave` setting lets you configure a set of Code Actions that are run when a file is saved. For example, you can enable organize imports on save by setting:
The `setting(editor.codeActionsOnSave)` setting lets you configure a set of Code Actions that are run when a file is saved. For example, you can enable organize imports on save by setting:
```json
// On explicit save, run fixAll source action. On auto save (window or focus change), run organizeImports source action.
@ -235,7 +235,7 @@ As of today, the following enums are supported:
* `always`: Triggers Code Actions when explicitly saved and on Auto Saves from window or focus changes.
* `never`: Never triggers Code Actions on save. Same as `false`.
You can also set `editor.codeActionsOnSave` to an array of Code Actions to execute in order.
You can also set `setting(editor.codeActionsOnSave)` to an array of Code Actions to execute in order.
Here are some source actions:
@ -298,25 +298,25 @@ To enable parameter name hints, set `javascript.inlayHints.parameterNames`. Ther
**Variable type inlay hints** show the types of variables that don't have explicit type annotations.
Setting: `javascript.inlayHints.variableTypes.enabled`
Setting: `setting(javascript.inlayHints.variableTypes.enabled)`
![Variable type inlay hints](images/javascript/inlay-var-types.png)
**Property type inlay hints** show the type of class properties that don't have an explicit type annotation.
Setting: `javascript.inlayHints.propertyDeclarationTypes.enabled`
Setting: `setting(javascript.inlayHints.propertyDeclarationTypes.enabled)`
![Property type inlay hints](images/javascript/inlay-property-types.png)
**Parameter type hints** show the types of implicitly typed parameters.
Setting: `javascript.inlayHints.parameterTypes.enabled`
Setting: `setting(javascript.inlayHints.parameterTypes.enabled)`
![Parameter type inlay hints](images/javascript/inlay-parameter-types.png)
**Return type inlay hints** show the return types of functions that don't have an explicit type annotation.
Setting: `javascript.inlayHints.functionLikeReturnTypes.enabled`
Setting: `setting(javascript.inlayHints.functionLikeReturnTypes.enabled)`
![Return type inlay hints](images/javascript/inlay-return-type.png)
@ -340,7 +340,7 @@ When you move or rename a file that is imported by other files in your JavaScrip
Sorry, your browser doesn't support HTML 5 video.
</video>
The `javascript.updateImportsOnFileMove.enabled` setting controls this behavior. Valid settings values are:
The `setting(javascript.updateImportsOnFileMove.enabled)` setting controls this behavior. Valid settings values are:
* `"prompt"` - The default. Asks if paths should be updated for each file move.
* `"always"` - Always automatically update paths.
@ -438,7 +438,7 @@ Yes, you can. You can see this working using JavaScript source maps in the [Node
### How do I disable Syntax Validation when using non-ES6 constructs?
Some users want to use syntax constructs like the proposed pipeline (`|>`) operator. However, these are currently not supported by VS Code's JavaScript language service and are flagged as errors. For users who still want to use these future features, we provide the `javascript.validate.enable` [setting](/docs/getstarted/settings.md).
Some users want to use syntax constructs like the proposed pipeline (`|>`) operator. However, these are currently not supported by VS Code's JavaScript language service and are flagged as errors. For users who still want to use these future features, we provide the `setting(javascript.validate.enable)` [setting](/docs/getstarted/settings.md).
With `javascript.validate.enable: false`, you disable all built-in syntax checking. If you do this, we recommend that you use a linter like [ESLint](https://eslint.org) to validate your source code.

Просмотреть файл

@ -17,7 +17,7 @@ JSON is a data format that is common in configuration files like `package.json`
For properties and values, both for JSON data with or without a schema, we offer up suggestions as you type with IntelliSense. You can also manually see suggestions with the **Trigger Suggestions** command (`kb(editor.action.triggerSuggest)`).
We also perform structural and value verification based on an associated JSON schema giving you red squiggles. To disable validation, use the `json.validate.enable` [setting](/docs/getstarted/settings.md).
We also perform structural and value verification based on an associated JSON schema giving you red squiggles. To disable validation, use the `setting(json.validate.enable)` [setting](/docs/getstarted/settings.md).
![IntelliSense](images/json/intellisense.png)
@ -49,7 +49,7 @@ You can fold regions of source code using the folding icons on the gutter betwee
In addition to the default JSON mode following the [JSON specification](https://www.json.org/), VS Code also has a **JSON with Comments** (jsonc) mode. This mode is used for the VS Code configuration files such as `settings.json`, `tasks.json`, or `launch.json`. When in the **JSON with Comments** mode, you can use single line (`//`) as well as block comments (`/* */`) as used in JavaScript. The mode also accepts trailing commas, but they are discouraged and the editor will display a warning.
The current editor mode is indicated in the editor's Status Bar. Select the mode indicator to change the mode and to configure how file extensions are associated to modes. You can also directly modify the `files.associations` [setting](/docs/languages/overview.md#add-a-file-extension-to-a-language) to associate file names or file name patterns to `jsonc`.
The current editor mode is indicated in the editor's Status Bar. Select the mode indicator to change the mode and to configure how file extensions are associated to modes. You can also directly modify the `setting(files.associations)` [setting](/docs/languages/overview.md#add-a-file-extension-to-a-language) to associate file names or file name patterns to `jsonc`.
## JSON schemas and settings
@ -57,7 +57,7 @@ To understand the structure of JSON files, we use [JSON schemas](https://json-sc
Servers like [JSON Schema Store](https://www.schemastore.org) provide schemas for most of the common JSON-based configuration files. However, schemas can also be defined in a file in the VS Code workspace, as well as the VS Code settings files.
The association of a JSON file to a schema can be done either in the JSON file itself using the `$schema` attribute, or in the User or Workspace [settings](/docs/getstarted/settings.md) (**File** > **Preferences** > **Settings**) under the property `json.schemas`.
The association of a JSON file to a schema can be done either in the JSON file itself using the `$schema` attribute, or in the User or Workspace [settings](/docs/getstarted/settings.md) (**File** > **Preferences** > **Settings**) under the property `setting(json.schemas)`.
VS Code extensions can also define schemas and schema mapping. That's why VS Code already knows about the schema of some well-known JSON files such as `package.json`, `bower.json`, and `tsconfig.json`.
@ -214,6 +214,6 @@ Note that `markdownDescription` is not part of the JSON schema specification but
### Offline mode
`json.schemaDownload.enable` controls whether the JSON extension fetches JSON schemas from `http` and `https`.
`setting(json.schemaDownload.enable)` controls whether the JSON extension fetches JSON schemas from `http` and `https`.
A warning triangle will show in the status bar when the current editor would like to use schemas that cannot be downloaded.

Просмотреть файл

@ -69,7 +69,7 @@ Accept one of these completions to insert the full link to that header, even if
![Adding a link to the selected header in another file](images/Markdown/md-workspace-header-suggestion-insert.png)
You can configure if/when workspace header completions show with the `markdown.suggest.paths.includeWorkspaceHeaderCompletions` setting. Valid setting values are:
You can configure if/when workspace header completions show with the `setting(markdown.suggest.paths.includeWorkspaceHeaderCompletions)` setting. Valid setting values are:
* `onDoubleHash` (the default)—Show workspace header completions only after you type `##`.
* `onSingleOrDoubleHash`—Show workspace header completions after you type `#` or `##`.
@ -93,7 +93,7 @@ Or you can use the **Markdown: Insert Image from Workspace** command to insert
Inserted images use Markdown image syntax `![](path/to/image.png)`. Links insert a normal Markdown link `[](path/to/file.md)`.
By default VS Code automatically copies dropped or pasted images outside of the workspace into your workspace. The `markdown.copyFiles.destination` setting controls where the new image file should be created. This setting maps [globs](/docs/editor/glob-patterns.md) that match on the current Markdown document to image destinations. The image destinations can also use some simple variables. See the `markdown.copyFiles.destination` setting description for information about the available variables.
By default VS Code automatically copies dropped or pasted images outside of the workspace into your workspace. The `setting(markdown.copyFiles.destination)` setting controls where the new image file should be created. This setting maps [globs](/docs/editor/glob-patterns.md) that match on the current Markdown document to image destinations. The image destinations can also use some simple variables. See the `setting(markdown.copyFiles.destination)` setting description for information about the available variables.
For example, if you want every Markdown file under `/docs` in your workspace to put new media files into an `images` directory specific to the current file, you can write:
@ -145,11 +145,11 @@ Link validation is off by default. To enable it, set `"markdown.validate.enabled
There are a few settings you can use to customize link validation:
* `markdown.validate.fileLinks.enabled` - Enable/disable validation of links to local files: `[link](/path/to/file.md)`
* `markdown.validate.fragmentLinks.enabled` - Enable/disable validation of links to headers in the current file: `[link](#some-header)`
* `markdown.validate.fileLinks.markdownFragmentLinks` - Enabled/disable validation of links to headers in the other markdown file: `[link](other-file.md#some-header)`
* `markdown.validate.referenceLinks.enabled` - Enable/disable validation of reference links: `[link][ref]`.
* `markdown.validate.ignoredLinks` - A list of link globs that skip validation. This is useful if you link to files that don't exist on disk but do exist once the Markdown is published.
* `setting(markdown.validate.fileLinks.enabled)` - Enable/disable validation of links to local files: `[link](/path/to/file.md)`
* `setting(markdown.validate.fragmentLinks.enabled)` - Enable/disable validation of links to headers in the current file: `[link](#some-header)`
* `setting(markdown.validate.fileLinks.markdownFragmentLinks)` - Enabled/disable validation of links to headers in the other markdown file: `[link](other-file.md#some-header)`
* `setting(markdown.validate.referenceLinks.enabled)` - Enable/disable validation of reference links: `[link][ref]`.
* `setting(markdown.validate.ignoredLinks)` - A list of link globs that skip validation. This is useful if you link to files that don't exist on disk but do exist once the Markdown is published.
### Find All References to headers and links
@ -179,13 +179,13 @@ You can also use `kb(editor.action.rename)` on:
### Automatic link updates on file move or rename
With automatic Markdown link updating, VS Code will automatically update Markdown links whenever a linked to file is moved or renamed. You can enable this feature with the `markdown.updateLinksOnFileMove.enabled` setting. Valid setting values are:
With automatic Markdown link updating, VS Code will automatically update Markdown links whenever a linked to file is moved or renamed. You can enable this feature with the `setting(markdown.updateLinksOnFileMove.enabled)` setting. Valid setting values are:
* `never` (the default) — Don't try to update links automatically.
* `prompt` Confirm before updating links.
* `always` Update links automatically without confirmation.
Automatic link updating detects renames of Markdown files, images, and directories. You can enable it for additional file types with `markdown.updateLinksOnFileMove.include`.
Automatic link updating detects renames of Markdown files, images, and directories. You can enable it for additional file types with `setting(markdown.updateLinksOnFileMove.include)`.
## Markdown preview
@ -215,7 +215,7 @@ VS Code automatically synchronizes the Markdown editor and the preview panes. Sc
![Markdown Preview editor selection scroll sync](images/Markdown/preview-scroll-sync.gif)
You can disable scroll synchronization using the `markdown.preview.scrollPreviewWithEditor` and `markdown.preview.scrollEditorWithPreview` [settings](/docs/getstarted/settings.md).
You can disable scroll synchronization using the `setting(markdown.preview.scrollPreviewWithEditor)` and `setting(markdown.preview.scrollEditorWithPreview)` [settings](/docs/getstarted/settings.md).
The currently selected line in the editor is indicated in the Markdown preview by a light gray bar in the left margin:

Просмотреть файл

@ -71,7 +71,7 @@ You can find a list of known identifiers in the [language identifier reference](
## Add a file extension to a language
You can add new file extensions to an existing language with the `files.associations` [setting](/docs/getstarted/settings.md).
You can add new file extensions to an existing language with the `setting(files.associations)` [setting](/docs/getstarted/settings.md).
For example, the setting below adds the `.myphp` file extension to the `php` language identifier:
@ -104,7 +104,7 @@ Yes, you can also add support for your favorite language through TextMate colori
### Can I map additional file extensions to a language?
Yes, with the `files.associations` [setting](/docs/getstarted/settings.md) you can map file extensions to an existing language either globally or per workspace.
Yes, with the `setting(files.associations)` [setting](/docs/getstarted/settings.md) you can map file extensions to an existing language either globally or per workspace.
Here is an example that will associate more file extensions to the PHP language:
@ -127,7 +127,7 @@ Note that the pattern is a [glob pattern](/docs/editor/glob-patterns.md) that wi
### How do I set the default language for new files?
Using the `files.defaultLanguage` [setting](/docs/getstarted/settings.md), you can map all new files to a default language. Whenever a new blank file is opened, the editor will be configured for that language mode.
Using the `setting(files.defaultLanguage)` [setting](/docs/getstarted/settings.md), you can map all new files to a default language. Whenever a new blank file is opened, the editor will be configured for that language mode.
This example will associate new files with the HTML language:

Просмотреть файл

@ -19,15 +19,15 @@ VS Code uses the official PHP linter (`php -l`) for PHP language diagnostics. Th
There are three [settings](/docs/getstarted/settings.md) to control the PHP linter:
* `php.validate.enable`: controls whether to enable PHP linting at all. Enabled by default.
* `php.validate.executablePath`: points to the PHP executable on disk. Set this if the PHP executable is not on the system path.
* `php.validate.run`: controls whether the validation is triggered on save (value: `"onSave"`) or on type (value: `"onType"`). Default is on save.
* `setting(php.validate.enable)`: controls whether to enable PHP linting at all. Enabled by default.
* `setting(php.validate.executablePath)`: points to the PHP executable on disk. Set this if the PHP executable is not on the system path.
* `setting(php.validate.run)`: controls whether the validation is triggered on save (value: `"onSave"`) or on type (value: `"onType"`). Default is on save.
To change the PHP settings, open your **User or Workspace Settings** (`kb(workbench.action.openSettings)`) and type 'php' to filter the list of available settings.
![show PHP settings](images/php/php-settings.png)
To set the PHP executable path, select the **Edit in settings.json** link under **PHP > Validate: Executable Path**, which will open your user `settings.json` file. Add the `php.validate.executablePath` setting with the path to your PHP installation:
To set the PHP executable path, select the **Edit in settings.json** link under **PHP > Validate: Executable Path**, which will open your user `settings.json` file. Add the `setting(php.validate.executablePath)` setting with the path to your PHP installation:
### Windows
@ -65,7 +65,7 @@ There are many PHP language extensions available on the [VS Code Marketplace](ht
### Disable built-in PHP support
To disable the built-in PHP smart completions in favor of suggestions from an installed PHP extension, uncheck **PHP > Suggest: Basic**, which sets `php.suggest.basic` to false in your `settings.json` file.
To disable the built-in PHP smart completions in favor of suggestions from an installed PHP extension, uncheck **PHP > Suggest: Basic**, which sets `setting(php.suggest.basic)` to false in your `settings.json` file.
## Debugging

Просмотреть файл

@ -75,7 +75,7 @@ Ruby LSP is able to display useful information about inferred or implicit values
![Ruby program with inlay hints displayed](images/ruby/ruby_lsp_inlay_hints.png)
While inlay hints can be helpful for understanding your code, you can also disable the feature via the **Editor > Inlay Hints: Enabled** setting (`editor.inlayHints.enabled`) or use the following to disable this feature only for Ruby LSP:
While inlay hints can be helpful for understanding your code, you can also disable the feature via the **Editor > Inlay Hints: Enabled** setting (`setting(editor.inlayHints.enabled)`) or use the following to disable this feature only for Ruby LSP:
```json
"rubyLsp.enabledFeatures": {
@ -128,7 +128,7 @@ When the linter finds errors and warnings in your source code, Ruby LSP can ofte
![Quick Fixes for linting violations](images/ruby/ruby_lsp_quickfix.png)
Additionally, **Code Action Widget: Include Nearby Quick Fixes** (`editor.codeActionWidget.includeNearbyQuickFixes`) is a setting that is enabled on default, which will activate the nearest Quick Fix in a line from `kb(editor.action.quickFix)` (command ID `editor.action.quickFix`), no matter where your cursor is in that line.
Additionally, **Code Action Widget: Include Nearby Quick Fixes** (`setting(editor.codeActionWidget.includeNearbyQuickFixes)`) is a setting that is enabled on default, which will activate the nearest Quick Fix in a line from `kb(editor.action.quickFix)` (command ID `editor.action.quickFix`), no matter where your cursor is in that line.
The command highlights the source code that will be refactored or fixed with Quick Fixes. Normal Code Actions and non-fix refactorings can still be activated at the cursor location.

Просмотреть файл

@ -135,7 +135,7 @@ One of the first things you may notice is rust-analyzer providing [inlay hints](
![Rust program with inlay hints displayed](images/rust/inlay-hints.png)
While inlay hints can be helpful for understanding your code, you can also configure the feature via the **Editor > Inlay Hints: Enabled** setting (`editor.inlayHints.enabled`).
While inlay hints can be helpful for understanding your code, you can also configure the feature via the **Editor > Inlay Hints: Enabled** setting (`setting(editor.inlayHints.enabled)`).
### Hover information
@ -157,7 +157,7 @@ rust-analyzer is able to use [semantic syntax highlighting](https://github.com/m
![Mutable variable underline in the editor](images/rust/mutable-underline.png)
Being able to quickly tell which Rust variables are mutable or not can help your understanding of source code, but you can also change the styling with VS Code `editor.semanticTokenColorCustomizations` setting in your user [settings](/docs/getstarted/settings.md).
Being able to quickly tell which Rust variables are mutable or not can help your understanding of source code, but you can also change the styling with VS Code `setting(editor.semanticTokenColorCustomizations)` setting in your user [settings](/docs/getstarted/settings.md).
In `settings.json`, you would add:
@ -201,7 +201,7 @@ The rustc linter, enabled by default, detects basic Rust errors, but you can use
When the linter finds errors and warnings in your source code, rust-analyzer can often provide suggested Quick Fixes (also called Code Actions), which are available via a light bulb hover in the editor. You can quickly open available Quick Fixes via the `kb(editor.action.quickFix)`.
Additionally, **Code Action Widget: Include Nearby Quick Fixes** (`editor.codeActionWidget.includeNearbyQuickFixes`) is a setting that is enabled on default, which will activate the nearest Quick Fix in a line from `kb(editor.action.quickFix)` (command ID `editor.action.quickFix`), no matter where your cursor is in that line.
Additionally, **Code Action Widget: Include Nearby Quick Fixes** (`setting(editor.codeActionWidget.includeNearbyQuickFixes)`) is a setting that is enabled on default, which will activate the nearest Quick Fix in a line from `kb(editor.action.quickFix)` (command ID `editor.action.quickFix`), no matter where your cursor is in that line.
The command highlights the source code that will be refactored or fixed with Quick Fixes. Normal Code Actions and non-fix refactorings can still be activated at the cursor location.

Просмотреть файл

@ -101,7 +101,7 @@ In addition to smart code completions, VS Code also includes basic TypeScript [s
You can install extensions to get additional snippets or define your own snippets for TypeScript. See [User Defined Snippets](/docs/editor/userdefinedsnippets.md) for more information.
> **Tip**: You can disable snippets by setting `editor.snippetSuggestions` to `"none"` in your [settings](/docs/getstarted/settings.md) file. If you'd like to see snippets, you can specify the order relative to suggestions; at the top (`"top"`), at the bottom (`"bottom"`), or inlined ordered alphabetically (`"inline"`). The default is `"inline"`.
> **Tip**: You can disable snippets by setting `setting(editor.snippetSuggestions)` to `"none"` in your [settings](/docs/getstarted/settings.md) file. If you'd like to see snippets, you can specify the order relative to suggestions; at the top (`"top"`), at the bottom (`"bottom"`), or inlined ordered alphabetically (`"inline"`). The default is `"inline"`.
## Errors and warnings

Просмотреть файл

@ -722,7 +722,7 @@ This is a known problem with the WSL file system implementation ([Microsoft/WSL#
To avoid the issue, set `remote.WSL.fileWatcher.polling` to true. However, polling based has a performance impact for large workspaces.
For large workspace you may want to increase the polling interval, `remote.WSL.fileWatcher.pollingInterval`, and control the folders that are watched with `files.watcherExclude`.
For large workspace you may want to increase the polling interval, `remote.WSL.fileWatcher.pollingInterval`, and control the folders that are watched with `setting(files.watcherExclude)`.
[WSL 2](https://learn.microsoft.com/windows/wsl/compare-versions#whats-new-in-wsl-2) does not have that file watcher problem and is not affected by the new setting.

Просмотреть файл

@ -181,7 +181,7 @@ That's a known problem with the WSL file system implementation ([Microsoft/WSL#3
To avoid the issue, set `remote.WSL.fileWatcher.polling` to true. However, polling based file watching has a performance impact for large workspaces.
For large workspace you want to increase the polling interval: `remote.WSL.fileWatcher.pollingInterval` and control the folders that are watched: `files.watcherExclude`.
For large workspace you want to increase the polling interval: `remote.WSL.fileWatcher.pollingInterval` and control the folders that are watched: `setting(files.watcherExclude)`.
[WSL 2](https://learn.microsoft.com/windows/wsl/compare-versions#whats-new-in-wsl-2) does not have that file watcher problem is also not affected by the new setting.

Просмотреть файл

@ -219,7 +219,7 @@ Pin-Priority: 9999
### "Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)
When you see this notification, it indicates that the VS Code file watcher is running out of file handles that are needed to implement file watching. Most often this can happen when opening a workspace that is large and contains many files. Before adjusting platform limits, make sure that potentially large folders, such as Python `.venv`, are added to the `files.watcherExclude` setting (more details below). It is also possible that other running applications consume so many file handles that none are left for VS Code to use. In that case it might help to close these other applications.
When you see this notification, it indicates that the VS Code file watcher is running out of file handles that are needed to implement file watching. Most often this can happen when opening a workspace that is large and contains many files. Before adjusting platform limits, make sure that potentially large folders, such as Python `.venv`, are added to the `setting(files.watcherExclude)` setting (more details below). It is also possible that other running applications consume so many file handles that none are left for VS Code to use. In that case it might help to close these other applications.
The current limit can be viewed by running:
@ -239,7 +239,7 @@ While 524,288 is the maximum number of files that can be watched, if you're in a
[Arch](https://www.archlinux.org/)-based distros (including Manjaro) require you to change a different file; follow [these steps](https://gist.github.com/tbjgolden/c53ca37f3bc2fab8c930183310918c8c) instead.
Another option is to exclude specific workspace directories from the VS Code file watcher with the `files.watcherExclude` [setting](/docs/getstarted/settings.md). The default for `files.watcherExclude` excludes `node_modules` and some folders under `.git`, but you can add other directories that you don't want VS Code to track.
Another option is to exclude specific workspace directories from the VS Code file watcher with the `setting(files.watcherExclude)` [setting](/docs/getstarted/settings.md). The default for `setting(files.watcherExclude)` excludes `node_modules` and some folders under `.git`, but you can add other directories that you don't want VS Code to track.
```json
"files.watcherExclude": {
@ -251,7 +251,7 @@ Another option is to exclude specific workspace directories from the VS Code fil
### I can't see Chinese characters in Ubuntu
We're working on a fix. In the meantime, open the application menu, then choose **File** > **Preferences** > **Settings**. In the **Text Editor** > **Font** section, set "Font Family" to `Droid Sans Mono, Droid Sans Fallback`. If you'd rather edit the `settings.json` file directly, set `editor.fontFamily` as shown:
We're working on a fix. In the meantime, open the application menu, then choose **File** > **Preferences** > **Settings**. In the **Text Editor** > **Font** section, set "Font Family" to `Droid Sans Mono, Droid Sans Fallback`. If you'd rather edit the `settings.json` file directly, set `setting(editor.fontFamily)` as shown:
```json
"editor.fontFamily": "Droid Sans Mono, Droid Sans Fallback"
@ -298,17 +298,17 @@ sudo touch /etc/apt/sources.list.d/vscode.list
### Cannot move or resize the window while X forwarding a remote window
If you are using X forwarding to use VS Code remotely, you will need to use the native title bar to ensure you can properly manipulate the window. You can switch to using it by setting `window.titleBarStyle` to `native`.
If you are using X forwarding to use VS Code remotely, you will need to use the native title bar to ensure you can properly manipulate the window. You can switch to using it by setting `setting(window.titleBarStyle)` to `native`.
### Using the custom title bar
The custom title bar and menus were enabled by default on Linux for several months. The custom title bar has been a success on Windows, but the customer response on Linux suggests otherwise. Based on feedback, we have decided to make this setting opt-in on Linux and leave the native title bar as the default.
The custom title bar provides many benefits including great theming support and better accessibility through keyboard navigation and screen readers. Unfortunately, these benefits do not translate as well to the Linux platform. Linux has a variety of desktop environments and window managers that can make the VS Code theming look foreign to users. For users needing the accessibility improvements, we recommend enabling the custom title bar when running in accessibility mode using a screen reader. You can still manually set the title bar with the **Window: Title Bar Style** (`window.titleBarStyle`) setting.
The custom title bar provides many benefits including great theming support and better accessibility through keyboard navigation and screen readers. Unfortunately, these benefits do not translate as well to the Linux platform. Linux has a variety of desktop environments and window managers that can make the VS Code theming look foreign to users. For users needing the accessibility improvements, we recommend enabling the custom title bar when running in accessibility mode using a screen reader. You can still manually set the title bar with the **Window: Title Bar Style** (`setting(window.titleBarStyle)`) setting.
### Broken cursor in editor with display scaling enabled
Due to an upstream [issue #14787](https://github.com/electron/electron/issues/14787) with Electron, the mouse cursor may render incorrectly with scaling enabled. If you notice that the usual text cursor is not being rendered inside the editor as you would expect, try falling back to the native menu bar by configuring the setting `window.titleBarStyle` to `native`.
Due to an upstream [issue #14787](https://github.com/electron/electron/issues/14787) with Electron, the mouse cursor may render incorrectly with scaling enabled. If you notice that the usual text cursor is not being rendered inside the editor as you would expect, try falling back to the native menu bar by configuring the setting `setting(window.titleBarStyle)` to `native`.
### Repository changed its origin value

Просмотреть файл

@ -104,7 +104,7 @@ Extensions don't benefit yet from the same proxy support that VS Code supports.
Similarly to extensions, a few other VS Code features don't yet fully support proxy networking, namely the CLI interface. The CLI interface is what you get when running `code --install-extension vscodevim.vim` from a command prompt or terminal. You can follow this issue's development in [GitHub](https://github.com/microsoft/vscode/issues/29910).
Due to both of these constraints, the `http.proxy`, `http.proxyStrictSSL` and `http.proxyAuthorization` variables are still part of VS Code's settings, yet they are only respected in these two scenarios.
Due to both of these constraints, the `setting(http.proxy)`, `setting(http.proxyStrictSSL)` and `setting(http.proxyAuthorization)` variables are still part of VS Code's settings, yet they are only respected in these two scenarios.
## Troubleshooting

Просмотреть файл

@ -112,13 +112,13 @@ Subscribe to [issue #122951](https://github.com/microsoft/vscode/issues/122951)
### Working with UNC paths
Beginning with version `1.78.1`, VS Code on Windows will only allow to access UNC paths (these begin with a leading `\\`) that were either approved by the user on startup or where the host name is configured to be allowed via the new `security.allowedUNCHosts` setting.
Beginning with version `1.78.1`, VS Code on Windows will only allow to access UNC paths (these begin with a leading `\\`) that were either approved by the user on startup or where the host name is configured to be allowed via the new `setting(security.allowedUNCHosts)` setting.
If you rely on using UNC paths in VS Code, you can either
* configure the host to be allowed via the `security.allowedUNCHosts` setting (for example add `server-a` when you open a path such as `\\server-a\path`)
* configure the host to be allowed via the `setting(security.allowedUNCHosts)` setting (for example add `server-a` when you open a path such as `\\server-a\path`)
* map the UNC path as network drive and use the drive letter instead of the UNC path ([documentation](https://support.microsoft.com/en-us/windows/map-a-network-drive-in-windows-29ce55d1-34e3-a7e2-4801-131475f9557d))
* define a global environment variable `NODE_UNC_HOST_ALLOWLIST` with the backslash-separated list of hostnames to allow, for example: `server-a\server-b` to allow the hosts `server-a` and `server-b`.
*Note:* if you are using any of the remote extensions to connect to a workspace remotely (such as SSH), the `security.allowedUNCHosts` has to be configured on the remote machine and not the local machine.
*Note:* if you are using any of the remote extensions to connect to a workspace remotely (such as SSH), the `setting(security.allowedUNCHosts)` has to be configured on the remote machine and not the local machine.
This change was done to improve the security when using VS Code with UNC paths. Please refer to the associated [security advisory](https://github.com/microsoft/vscode/security/advisories/GHSA-mmfh-4pv3-39hr) for more information.

Просмотреть файл

@ -79,7 +79,7 @@ VS Code uses `git rev-parse --show-toplevel` to determine the root of a Git repo
To avoid confusion, and to reduce the risk of data loss, VS Code will display a notification and a new welcome view in the Source Control view, and will not automatically open Git repositories from the parent folders of workspaces and open files.
You can control how Git repositories from parent folders are handled using the `git.openRepositoryInParentFolders` setting. If you would like to restore the old behavior, set the `git.openRepositoryInParentFolders` setting to `always`.
You can control how Git repositories from parent folders are handled using the `setting(git.openRepositoryInParentFolders)` setting. If you would like to restore the old behavior, set the `setting(git.openRepositoryInParentFolders)` setting to `always`.
### Can I use SSH Git authentication with VS Code?

Просмотреть файл

@ -69,9 +69,9 @@ User suggestions are triggered by the "@" character and issue suggestions are tr
![User and Issue suggestions](images/github/user-issue-suggest.gif)
The issues that appear in the suggestion can be configured with the **GitHub Issues: Queries** (`githubIssues.queries`) [setting](/docs/getstarted/settings.md). The queries use the [GitHub search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax).
The issues that appear in the suggestion can be configured with the **GitHub Issues: Queries** (`setting(githubIssues.queries)`) [setting](/docs/getstarted/settings.md). The queries use the [GitHub search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax).
You can also configure which files show these suggestions using the settings **GitHub Issues: Ignore Completion Trigger** (`githubIssues.ignoreCompletionTrigger`) and **GitHub Issues: Ignore User Completion Trigger** (`githubIssues.ignoreUserCompletionTrigger`). These settings take an array of [language identifiers](/docs/languages/identifiers.md) to specify the file types.
You can also configure which files show these suggestions using the settings **GitHub Issues: Ignore Completion Trigger** (`setting(githubIssues.ignoreCompletionTrigger)`) and **GitHub Issues: Ignore User Completion Trigger** (`setting(githubIssues.ignoreUserCompletionTrigger)`). These settings take an array of [language identifiers](/docs/languages/identifiers.md) to specify the file types.
```jsonc
// Languages that the '#' character should not be used to trigger issue completion suggestions.
@ -86,7 +86,7 @@ From the **Pull Requests** view you can view, manage, and create pull requests.
![Pull Request View](images/github/pull-request-view.png)
The queries used to display pull requests can be configured with the **GitHub Pull Requests: Queries** (`githubPullRequests.queries`) setting and use the [GitHub search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax).
The queries used to display pull requests can be configured with the **GitHub Pull Requests: Queries** (`setting(githubPullRequests.queries)`) setting and use the [GitHub search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax).
```json
"githubPullRequests.queries": [
@ -136,7 +136,7 @@ Issues can be created from the **+** button in the **Issues** view and by using
![Create Issue from TODO](images/github/issue-from-todo.gif)
You can configure the trigger for the Code Action using the **GitHub Issues: Create Issue Triggers** (`githubIssues.createIssueTriggers`) setting.
You can configure the trigger for the Code Action using the **GitHub Issues: Create Issue Triggers** (`setting(githubIssues.createIssueTriggers)`) setting.
The default issue triggers are:
@ -165,9 +165,9 @@ The Status bar also shows the active issue and if you select that item, a list o
![Issue Status bar actions](images/github/issue-status-bar-actions.png)
You can configure the name of the branch using the **GitHub Issues: Issue Branch Title** (`githubIssues.issueBranchTitle`) setting. If your workflow doesn't involve creating a branch, or if you want to be prompted to enter a branch name every time, you can skip that step by turning off the **GitHub Issues: Use Branch For Issues** (`githubIssues.useBranchForIssues`) setting.
You can configure the name of the branch using the **GitHub Issues: Issue Branch Title** (`setting(githubIssues.issueBranchTitle)`) setting. If your workflow doesn't involve creating a branch, or if you want to be prompted to enter a branch name every time, you can skip that step by turning off the **GitHub Issues: Use Branch For Issues** (`setting(githubIssues.useBranchForIssues)`) setting.
Once you are done working on the issue and want to commit a change, the commit message input box in the **Source Control** view will be populated with a message, which can be configured with **GitHub Issues: Working Issue Format SCM** (`githubIssues.workingIssueFormatScm`).
Once you are done working on the issue and want to commit a change, the commit message input box in the **Source Control** view will be populated with a message, which can be configured with **GitHub Issues: Working Issue Format SCM** (`setting(githubIssues.workingIssueFormatScm)`).
## GitHub Repositories extension

Просмотреть файл

@ -57,9 +57,9 @@ To cancel the commit operation, you can either clear the contents of the text ed
![Author commit message in a full text editor](images/overview/scm-git-editor.gif)
You can disable this functionality by toggling the `git.useEditorAsCommitInput` setting. After the setting is changed, you have to restart VS Code for the change to take effect.
You can disable this functionality by toggling the `setting(git.useEditorAsCommitInput)` setting. After the setting is changed, you have to restart VS Code for the change to take effect.
To use the same flow for git commit commands executed in the integrated terminal, enable the `git.terminalGitEditor` setting.
To use the same flow for git commit commands executed in the integrated terminal, enable the `setting(git.terminalGitEditor)` setting.
## Cloning a repository
@ -93,15 +93,15 @@ If you run **Git: Checkout to**, you will see a dropdown list containing all of
The **Git: Create Branch** command lets you quickly create a new branch. Just provide the name of your new branch and VS Code will create the branch and switch to it. If you choose to **Create new branch from...**, you'll get an extra prompt that allows you to specify which commit the new branch should be pointing to.
> **Tip**: VS Code can automatically save and restore open editors when you switch to another branch. Use the `scm.workingSets.enabled` setting to enable this feature. To control the open editors when switching to a branch for the first time, you can use the `scm.workingSets.default` setting.
> **Tip**: VS Code can automatically save and restore open editors when you switch to another branch. Use the `setting(scm.workingSets.enabled)` setting to enable this feature. To control the open editors when switching to a branch for the first time, you can use the `setting(scm.workingSets.default)` setting.
## Remotes
Given that your repository is connected to some remote and that your checked out branch has an [upstream link](https://git-scm.com/book/ch3-5.html) to a branch in that remote, VS Code offers you useful actions to **push**, **pull**, and **sync** that branch (the latter will run a **pull** command followed by a **push** command). You can find these actions in the **Views and More Actions** `...` menu, along with the option to **add or remove a remote**.
VS Code is able to periodically fetch changes from your remotes. This enables VS Code to show how many changes your local repository is ahead or behind the remote. This feature is disabled by default and you can use the `git.autofetch` [setting](/docs/getstarted/settings.md) to enable it.
VS Code is able to periodically fetch changes from your remotes. This enables VS Code to show how many changes your local repository is ahead or behind the remote. This feature is disabled by default and you can use the `setting(git.autofetch)` [setting](/docs/getstarted/settings.md) to enable it.
>**Tip:** You should [set up a credential helper](https://docs.github.com/get-started/getting-started-with-git/caching-your-github-credentials-in-git) to avoid getting asked for credentials every time VS Code talks to your Git remotes. If you don't do this, you may want to consider disabling automatic fetching via the `git.autofetch` [setting](/docs/getstarted/settings.md) to reduce the number of prompts you get.
>**Tip:** You should [set up a credential helper](https://docs.github.com/get-started/getting-started-with-git/caching-your-github-credentials-in-git) to avoid getting asked for credentials every time VS Code talks to your Git remotes. If you don't do this, you may want to consider disabling automatic fetching via the `setting(git.autofetch)` [setting](/docs/getstarted/settings.md) to reduce the number of prompts you get.
## Incoming and outgoing changes

Просмотреть файл

@ -18,7 +18,7 @@ The terminal supports two different types of persistent sessions:
* Process reconnection: When reloading a window (for example, after installing an extension), **reconnect** to the previous process and restore its content.
* Process revive: When restarting VS Code, a terminal's content is restored and the process is **relaunched** using its original environment.
Both of these persistent sessions can be disabled by setting `terminal.integrated.enablePersistentSessions` to `false`, and the amount of scrollback restored is controlled by the`terminal.integrated.persistentSessionScrollback` setting. Process revive can be configured independently with `terminal.integrated.persistentSessionReviveProcess`.
Both of these persistent sessions can be disabled by setting `setting(terminal.integrated.enablePersistentSessions)` to `false`, and the amount of scrollback restored is controlled by the`setting(terminal.integrated.persistentSessionScrollback)` setting. Process revive can be configured independently with `setting(terminal.integrated.persistentSessionReviveProcess)`.
### Moving terminals between windows
@ -26,7 +26,7 @@ Terminal tabs can be dragged and dropped between VS Code windows. This can also
### Configure how the terminal behaves on start up
When opening a window, if the terminal view is visible it will either reconnect to the terminal using persistent sessions, or create a new shell. This behavior can be fine tuned with the `terminal.integrated.hideOnStartup` setting.
When opening a window, if the terminal view is visible it will either reconnect to the terminal using persistent sessions, or create a new shell. This behavior can be fine tuned with the `setting(terminal.integrated.hideOnStartup)` setting.
* `never` (default): Never hide the terminal view on startup.
* `whenEmpty`: Only hide the terminal when there are no persistent sessions restored.
@ -36,7 +36,7 @@ When opening a window, if the terminal view is visible it will either reconnect
As an embedded application, the integrated terminal should intercept some, but not all, keybindings dispatched within VS Code.
The configurable `terminal.integrated.commandsToSkipShell` setting determines which command's keybindings should always "skip the shell" and instead be handled by VS Code's keybinding system. By default, it contains a hard-coded list of commands that are integral to the VS Code experience but you can add or remove specific commands:
The configurable `setting(terminal.integrated.commandsToSkipShell)` setting determines which command's keybindings should always "skip the shell" and instead be handled by VS Code's keybinding system. By default, it contains a hard-coded list of commands that are integral to the VS Code experience but you can add or remove specific commands:
```jsonc
{
@ -49,13 +49,13 @@ The configurable `terminal.integrated.commandsToSkipShell` setting determines wh
}
```
Look at the `terminal.integrated.commandsToSkipShell` setting details to see the complete list of default commands.
Look at the `setting(terminal.integrated.commandsToSkipShell)` setting details to see the complete list of default commands.
>**Tip:** `terminal.integrated.sendKeybindingsToShell` can be configured to override `terminal.integrated.commandsToSkipShell` and dispatch most keybindings to the shell. Note that this will disable keybindings like `kbstyle(Ctrl+F)` to open [find](/docs/terminal/basics#find) though.
>**Tip:** `setting(terminal.integrated.sendKeybindingsToShell)` can be configured to override `setting(terminal.integrated.commandsToSkipShell)` and dispatch most keybindings to the shell. Note that this will disable keybindings like `kbstyle(Ctrl+F)` to open [find](/docs/terminal/basics#find) though.
### Chords
Chord keybindings are made up of two keybindings, for example `kbstyle(Ctrl+K)` followed by `kbstyle(Ctrl+C)` to change the line to a comment. Chords always skip the shell by default but can be disabled with `terminal.integrated.allowChords`.
Chord keybindings are made up of two keybindings, for example `kbstyle(Ctrl+K)` followed by `kbstyle(Ctrl+C)` to change the line to a comment. Chords always skip the shell by default but can be disabled with `setting(terminal.integrated.allowChords)`.
### macOS clear screen
@ -80,7 +80,7 @@ Additionally, this keyboard shortcut will be overridden automatically if any ext
### Mnemonics
Using mnemonics to access VS Code's menu (for example, `kbstyle(Alt+F)` for File menu) is disabled by default in the terminal as these key events are often important hotkeys in shells. Set `terminal.integrated.allowMnemonics` to enable mnemonics, but note that this will disallow any `kbstyle(Alt)` key events to go to the shell. This setting does nothing on macOS.
Using mnemonics to access VS Code's menu (for example, `kbstyle(Alt+F)` for File menu) is disabled by default in the terminal as these key events are often important hotkeys in shells. Set `setting(terminal.integrated.allowMnemonics)` to enable mnemonics, but note that this will disallow any `kbstyle(Alt)` key events to go to the shell. This setting does nothing on macOS.
### Custom sequence keybindings
@ -109,9 +109,9 @@ The `sendSequence` command only works with the `\u0000` format for using charact
In order to avoid unnecessary output and user prompts, the terminal does not show warning dialogs when processes exit. If warnings are desirable, they can be configured with the following settings:
* `terminal.integrated.confirmOnExit` - Controls whether to confirm when the window closes if there are active debug sessions.
* `terminal.integrated.confirmOnKill` - Controls whether to confirm killing terminals when they have child processes.
* `terminal.integrated.showExitAlert` - Controls whether to show the alert "The terminal process terminated with exit code" when exit code is non-zero.
* `setting(terminal.integrated.confirmOnExit)` - Controls whether to confirm when the window closes if there are active debug sessions.
* `setting(terminal.integrated.confirmOnKill)` - Controls whether to confirm killing terminals when they have child processes.
* `setting(terminal.integrated.showExitAlert)` - Controls whether to show the alert "The terminal process terminated with exit code" when exit code is non-zero.
## Auto replies
@ -131,19 +131,19 @@ No auto replies are configured by default as providing shell input should be an
## Change tab stop width
The `terminal.integrated.tabStopWidth` setting allows configuring the tab stop width when a program running in the terminal outputs `\t`. This should typically not be needed as programs will often move the cursor instead of using the `kbstyle(Tab)` character, but may be useful in some situations.
The `setting(terminal.integrated.tabStopWidth)` setting allows configuring the tab stop width when a program running in the terminal outputs `\t`. This should typically not be needed as programs will often move the cursor instead of using the `kbstyle(Tab)` character, but may be useful in some situations.
## Unicode and emoji support
The terminal has both Unicode and emoji support. When these characters are used in the terminal, there are some caveats to that support:
* Some Unicode symbols have ambiguous width that may change between Unicode versions. Currently we support Unicode version 6 and 11 widths, which can be configured with the `terminal.integrated.unicodeVersion` setting. The version specified should match the Unicode version used by the shell/operating system, otherwise there could be rendering issues. Note that the Unicode version of the shell/OS may not match the font's actual width.
* Some Unicode symbols have ambiguous width that may change between Unicode versions. Currently we support Unicode version 6 and 11 widths, which can be configured with the `setting(terminal.integrated.unicodeVersion)` setting. The version specified should match the Unicode version used by the shell/operating system, otherwise there could be rendering issues. Note that the Unicode version of the shell/OS may not match the font's actual width.
* Some emojis comprised of multiple characters may not render correctly, for example, skin tone modifiers.
* Emoji support is limited on Windows.
## Image support
Images in the terminal work provided they use either the Sixel or iTerm inline image protocols. This feature is disabled by default and can be enabled with the `terminal.integrated.enableImages` setting.
Images in the terminal work provided they use either the Sixel or iTerm inline image protocols. This feature is disabled by default and can be enabled with the `setting(terminal.integrated.enableImages)` setting.
Current limitations:
@ -160,11 +160,11 @@ The process environment of the application running within the terminal is influe
When VS Code is opened, it launches a login shell environment in order to source a shell environment. This is done because developer tools are often added to the `$PATH` in a shell launch script like `~/.bash_profile`. By default, the terminal inherits this environment, depending on your [profile shell arguments](/docs/terminal/profiles.md#configuring-profiles), and means that multiple profile scripts may have run, which could cause unexpected behavior.
This environment inheritance can be disabled on macOS and Linux via the `terminal.integrated.inheritEnv` setting.
This environment inheritance can be disabled on macOS and Linux via the `setting(terminal.integrated.inheritEnv)` setting.
### Interaction with `$LANG`
There is some special interaction with the `$LANG` environment variable, which determines how characters are presented in the terminal. This feature is configured with the `terminal.integrated.detectLocale` setting:
There is some special interaction with the `$LANG` environment variable, which determines how characters are presented in the terminal. This feature is configured with the `setting(terminal.integrated.detectLocale)` setting:
| Value | Behavior
|------------------|---
@ -186,7 +186,7 @@ VS Code's terminal is built on the [xterm.js](https://github.com/xtermjs/xterm.j
An open source project called [winpty](https://github.com/rprichard/winpty) was created to try to fix this issue by providing an emulation/translation layer between a Unix-style terminal and a Windows console. VS Code's terminal was originally implemented using only winpty. This was great at the time, but in 2018, Windows 10 received [the ConPTY API](https://devblogs.microsoft.com/commandline/windows-command-line-introducing-the-windows-pseudo-console-conpty/), which took the idea pioneered by winpty and baked it into Windows, providing a more reliable and supported system to leverage Unix-style terminals and apps on Windows.
VS Code defaults to ConPTY on Windows 10+ (from build number 18309) and falls back to winpty as a legacy option for older versions of Windows. ConPTY can be explicitly disabled via the `terminal.integrated.windowsEnableConpty` settings but this should normally be avoided.
VS Code defaults to ConPTY on Windows 10+ (from build number 18309) and falls back to winpty as a legacy option for older versions of Windows. ConPTY can be explicitly disabled via the `setting(terminal.integrated.windowsEnableConpty)` settings but this should normally be avoided.
Since ConPTY is an emulation layer, it does come with some quirks. The most common is that ConPTY considers itself the owner of the viewport and because of that will sometimes reprint the screen. This reprinting can cause unexpected behavior such as old content displaying after running the **Terminal: Clear** command.
@ -196,9 +196,9 @@ This section outlines topics specific to when VS Code is connected to a remote m
### Reducing remote input latency
Local echo is a feature that helps mitigate the effect of input latency on remote windows. It writes the keystrokes in the terminal in a dimmed color before the result is confirmed by the remote. By default, the feature start running when latency is detected to be above 30 ms and the timing can be configured with `terminal.integrated.localEchoLatencyThreshold`. The color of the unconfirmed characters is defined by `terminal.integrated.localEchoStyle`.
Local echo is a feature that helps mitigate the effect of input latency on remote windows. It writes the keystrokes in the terminal in a dimmed color before the result is confirmed by the remote. By default, the feature start running when latency is detected to be above 30 ms and the timing can be configured with `setting(terminal.integrated.localEchoLatencyThreshold)`. The color of the unconfirmed characters is defined by `setting(terminal.integrated.localEchoStyle)`.
Local echo disables itself dynamically depending on the active program in the terminal. This is controlled by `terminal.integrated.localEchoExcludePrograms`, which defaults to `['vim', 'vi', 'nano', 'tmux']`. It's recommended that you disable the feature for any application or shell that is highly dynamic and/or does a lot of reprinting of the screen when typing.
Local echo disables itself dynamically depending on the active program in the terminal. This is controlled by `setting(terminal.integrated.localEchoExcludePrograms)`, which defaults to `['vim', 'vi', 'nano', 'tmux']`. It's recommended that you disable the feature for any application or shell that is highly dynamic and/or does a lot of reprinting of the screen when typing.
To disable the feature completely, use:

Просмотреть файл

@ -19,12 +19,12 @@ _[Sapphire](https://marketplace.visualstudio.com/items?itemName=tyriar.theme-sap
Text in the terminal can be customized with the following settings:
- `terminal.integrated.fontFamily`: The font family to use, this takes a string in the format that fontFamily in CSS takes. For example, `"'Fira Code', monospace"` will configure `Fira Code` as the primary font and `monospace` as the fallback when it lacks glyphs.
- `terminal.integrated.fontSize`: Changes the font size of text in the terminal.
- `terminal.integrated.letterSpacing`: Configures additional horizontal spacing between characters in pixels.
- `terminal.integrated.lineHeight`: Configures additional spacing vertical between characters as a multiplier of the regular line height. For example, `1.1` will add 10% additional vertical space.
- `terminal.integrated.fontWeight`: Configures the font weight of "normal" text.
- `terminal.integrated.fontWeightBold`: Configures the font weight of "bold" text.
- `setting(terminal.integrated.fontFamily)`: The font family to use, this takes a string in the format that fontFamily in CSS takes. For example, `"'Fira Code', monospace"` will configure `Fira Code` as the primary font and `monospace` as the fallback when it lacks glyphs.
- `setting(terminal.integrated.fontSize)`: Changes the font size of text in the terminal.
- `setting(terminal.integrated.letterSpacing)`: Configures additional horizontal spacing between characters in pixels.
- `setting(terminal.integrated.lineHeight)`: Configures additional spacing vertical between characters as a multiplier of the regular line height. For example, `1.1` will add 10% additional vertical space.
- `setting(terminal.integrated.fontWeight)`: Configures the font weight of "normal" text.
- `setting(terminal.integrated.fontWeightBold)`: Configures the font weight of "bold" text.
### Powerline symbols and Nerd Fonts
@ -44,10 +44,10 @@ Nerd Fonts work the same and typically have a `" NF"` suffix, the following is a
The terminal cursor style and whether it blinks can be customized with the following settings:
- `terminal.integrated.cursorStyle`: Defines the shape of the cursor, can be block, line or underline.
- `terminal.integrated.cursorWidth`: How wide in pixels the cursor should be when the cursor style is set to `line`.
- `terminal.integrated.cursorBlinking`: Whether the cursor should blink when the terminal is focused.
- `terminal.integrated.cursorStyleInactive`: Defines the shape of the cursor, can be outline, block, line, underline or none.
- `setting(terminal.integrated.cursorStyle)`: Defines the shape of the cursor, can be block, line or underline.
- `setting(terminal.integrated.cursorWidth)`: How wide in pixels the cursor should be when the cursor style is set to `line`.
- `setting(terminal.integrated.cursorBlinking)`: Whether the cursor should blink when the terminal is focused.
- `setting(terminal.integrated.cursorStyleInactive)`: Defines the shape of the cursor, can be outline, block, line, underline or none.
## Customizing tabs
@ -59,19 +59,19 @@ Terminal tabs appear on the right of the terminal view when there are two or mor
The default visibility is designed to save horizontal space, but may not be desirable. How tabs are presented can be configured with the following settings:
- `terminal.integrated.tabs.hideCondition`: When to hide the tabs to the right, set to `"never"` to always show them.
- `terminal.integrated.tabs.showActiveTerminal`: When to show the active terminal in the terminal view header.
- `terminal.integrated.tabs.showActions`: When to show the active terminal's actions in the view header.
- `terminal.integrated.tabs.location`: Whether the tabs should be shown on the left or right of the terminal.
- `terminal.integrated.tabs.enabled`: Whether to use tabs, disabling will show the original dropdown view.
- `setting(terminal.integrated.tabs.hideCondition)`: When to hide the tabs to the right, set to `"never"` to always show them.
- `setting(terminal.integrated.tabs.showActiveTerminal)`: When to show the active terminal in the terminal view header.
- `setting(terminal.integrated.tabs.showActions)`: When to show the active terminal's actions in the view header.
- `setting(terminal.integrated.tabs.location)`: Whether the tabs should be shown on the left or right of the terminal.
- `setting(terminal.integrated.tabs.enabled)`: Whether to use tabs, disabling will show the original dropdown view.
### Tab text
The text on each tab is determined by the following settings:
- `terminal.integrated.tabs.title`: Tab title.
- `terminal.integrated.tabs.description`: Text that appears to the right of the title.
- `terminal.integrated.tabs.separator`: Separator character between the title and description.
- `setting(terminal.integrated.tabs.title)`: Tab title.
- `setting(terminal.integrated.tabs.description)`: Text that appears to the right of the title.
- `setting(terminal.integrated.tabs.separator)`: Separator character between the title and description.
By default, the title displays what the shell's detected process name.
@ -83,7 +83,7 @@ Other terminals often display the escape sequence sent by the shell as the title
### Icons
Each terminal has an associated icon that is determined by its [terminal profile](/docs/terminal/profiles.md). The default icon and its color, which will be used if not defined in a profile, can be configured with the `terminal.integrated.tabs.defaultIcon` and `terminal.integrated.tabs.defaultColor` settings.
Each terminal has an associated icon that is determined by its [terminal profile](/docs/terminal/profiles.md). The default icon and its color, which will be used if not defined in a profile, can be configured with the `setting(terminal.integrated.tabs.defaultIcon)` and `setting(terminal.integrated.tabs.defaultColor)` settings.
### Status
@ -95,13 +95,13 @@ A terminal's "status", if any, is signified by an icon that appears on the right
### Visual bell
When the terminal's bell is triggered, a yellow bell icon is briefly shown. This can be disabled with `terminal.integrated.enableBell` and the duration can be configured with `terminal.integrated.bellDuration`.
When the terminal's bell is triggered, a yellow bell icon is briefly shown. This can be disabled with `setting(terminal.integrated.enableBell)` and the duration can be configured with `setting(terminal.integrated.bellDuration)`.
## Terminal colors
While the terminal is capable of displaying true color, programs commonly use 8 ANSI colors (black, red, green, yellow, blue, magenta, cyan and white) and bright variants of each. These ANSI colors are determined by the active [color theme](/docs/getstarted/themes.md), but they can also be configured independently from the theme with the [workbench.colorCustomizations](/docs/getstarted/themes.md#workbench-colors) setting.
Whether bold text uses the normal ANSI colors or the bright variant can be configured with the `terminal.integrated.drawBoldTextInBrightColors` setting.
Whether bold text uses the normal ANSI colors or the bright variant can be configured with the `setting(terminal.integrated.drawBoldTextInBrightColors)` setting.
### Minimum contrast ratio
@ -124,7 +124,7 @@ The terminal features two different renderers, each of which have different trad
GPU acceleration driven by the WebGL renderer is enabled in the terminal by default. This helps the terminal work faster and display at a high FPS by significantly reducing the time the CPU spends rendering each frame.
The default `terminal.integrated.gpuAcceleration` value of `"auto"` tries the WebGL renderer and if it failed will fall back to the DOM renderer. When on Linux VMs, browsers that don't support WebGL, or machines with outdated drivers, WebGL may not work properly.
The default `setting(terminal.integrated.gpuAcceleration)` value of `"auto"` tries the WebGL renderer and if it failed will fall back to the DOM renderer. When on Linux VMs, browsers that don't support WebGL, or machines with outdated drivers, WebGL may not work properly.
### Custom glyphs

Просмотреть файл

@ -56,7 +56,7 @@ Place multiple terminals side-by-side and create a group by splitting a terminal
* `kbstyle(Alt)` and click on a tab, the **+** button, or the single tab on the terminal panel.
* Trigger the `kb(workbench.action.terminal.split)` command.
> **Tip:** The working directory for the new terminal depends on the `terminal.integrated.splitCwd` [setting](/docs/getstarted/settings.md).
> **Tip:** The working directory for the new terminal depends on the `setting(terminal.integrated.splitCwd)` [setting](/docs/getstarted/settings.md).
Navigate between terminals in a group by focusing the previous pane, `kb(workbench.action.terminal.focusPreviousPane)`, or the next pane, `kb(workbench.action.terminal.focusNextPane)`.
@ -74,11 +74,11 @@ You can have terminal editors on either side or arranged in multiple dimensions
![Terminal editors are can be laid out using the editor group layout system, for example 2 terminals could sit to the right of a text editor](images/basics/terminal-editor-grid.png)
The `terminal.integrated.defaultLocation` setting can change the default `view` or `editor` area terminal location.
The `setting(terminal.integrated.defaultLocation)` setting can change the default `view` or `editor` area terminal location.
## Navigating the buffer
The content in the terminal is called the buffer, with the section right above the bottom viewport being called "scrollback". The amount of scrollback kept is determined by the `terminal.integrated.scrollback` [setting](/docs/getstarted/settings.md) and defaults to `1000` lines.
The content in the terminal is called the buffer, with the section right above the bottom viewport being called "scrollback". The amount of scrollback kept is determined by the `setting(terminal.integrated.scrollback)` [setting](/docs/getstarted/settings.md) and defaults to `1000` lines.
There are various commands available to navigate around the terminal buffer:
@ -94,7 +94,7 @@ There are various commands available to navigate around the terminal buffer:
* Scroll to the previous command - `kb(workbench.action.terminal.scrollToPreviousCommand)`
* Scroll to the next command - `kb(workbench.action.terminal.scrollToNextCommand)`
Scrolling will happen instantaneously, but can be configured to animate over a short duration with the `terminal.integrated.smoothScrolling` setting.
Scrolling will happen instantaneously, but can be configured to animate over a short duration with the `setting(terminal.integrated.smoothScrolling)` setting.
## Links
@ -114,7 +114,7 @@ These built-in link handlers are used in the following priority order:
![Activating a folder link will open it in a new window](images/basics/link-folder.png)
* Word links: Fallback link type that uses the `terminal.integrated.wordSeparators` setting. The setting defines word boundaries and make nearly all text into words. Activating a word link searches the workspace for the word. If there is a single result it will open, otherwise it will present the search results. Word links are considered "low confidence" and will not show an underline or tooltip unless you hold the `kbstyle(Ctrl)`/`kbstyle(Cmd)` key. They also have limited support for line and column suffixes.
* Word links: Fallback link type that uses the `setting(terminal.integrated.wordSeparators)` setting. The setting defines word boundaries and make nearly all text into words. Activating a word link searches the workspace for the word. If there is a single result it will open, otherwise it will present the search results. Word links are considered "low confidence" and will not show an underline or tooltip unless you hold the `kbstyle(Ctrl)`/`kbstyle(Cmd)` key. They also have limited support for line and column suffixes.
![Activating a word link 'terminal:15' will open a Quick Pick searching the workspace for all files containing 'terminal', choosing an option will open the file at line 15](images/basics/link-word.png)
@ -122,7 +122,7 @@ The **Open Detected Link** command (`kb(workbench.action.terminal.openDetectedLi
![Open Detected Link opens a quick pick with all links in the viewport, split into categories](images/basics/link-open-detected.png)
> **Tip:** If link verification causes performance issues, like in high latency remote environments, disable it via the `terminal.integrated.enableFileLinks` [setting](/docs/getstarted/settings.md).
> **Tip:** If link verification causes performance issues, like in high latency remote environments, disable it via the `setting(terminal.integrated.enableFileLinks)` [setting](/docs/getstarted/settings.md).
### Extensions handling links
@ -146,9 +146,9 @@ The keybindings for copy and paste follow platform standards:
* macOS: `kbstyle(Cmd+C)` and `kbstyle(Cmd+V)`
* Windows: `kbstyle(Ctrl+C)` and `kbstyle(Ctrl+V)`
Copying is done automatically on selection when `terminal.integrated.copyOnSelection` is enabled.
Copying is done automatically on selection when `setting(terminal.integrated.copyOnSelection)` is enabled.
By default, there is a warning when pasting multiple lines, which can be disabled with the `terminal.integrated.enableMultiLinePasteWarning` setting. This is only done when the shell does not support "bracketed paste mode". When that mode is enabled, the shell is indicating that it can handle multiple line pasting.
By default, there is a warning when pasting multiple lines, which can be disabled with the `setting(terminal.integrated.enableMultiLinePasteWarning)` setting. This is only done when the shell does not support "bracketed paste mode". When that mode is enabled, the shell is indicating that it can handle multiple line pasting.
## Using the mouse
@ -160,7 +160,7 @@ The right-click behavior differs based on the platform:
* macOS: Select the word under the cursor and show the context menu.
* Windows: Copy and drop selection if there is a selection, otherwise paste.
This can be configured using the `terminal.integrated.rightClickBehavior` setting. The options are:
This can be configured using the `setting(terminal.integrated.rightClickBehavior)` setting. The options are:
* `default` - Show the context menu.
* `copyPaste` - Copy when there is a selection, otherwise paste.
@ -170,11 +170,11 @@ This can be configured using the `terminal.integrated.rightClickBehavior` settin
### Reposition the cursor with Alt
`kbstyle(Alt)` and left-click will reposition the cursor to underneath the mouse. This works by simulating arrow keystrokes, which may not work reliably for some shells or programs. This feature can be disabled with the `terminal.integrated.altClickMovesCursor` setting.
`kbstyle(Alt)` and left-click will reposition the cursor to underneath the mouse. This works by simulating arrow keystrokes, which may not work reliably for some shells or programs. This feature can be disabled with the `setting(terminal.integrated.altClickMovesCursor)` setting.
### Mouse events mode
When applications running in the terminal turn on mouse events mode, such as Vim mouse mode, mouse interaction is sent to the application instead of the terminal. This means that clicking and dragging will no longer create a selection. Terminal selection can be forced by holding the `kbstyle(Alt)` key on Windows and Linux, this can also be done with the `kbstyle(Option)` key on macOS but requires enabling the `terminal.integrated.macOptionClickForcesSelection` setting first.
When applications running in the terminal turn on mouse events mode, such as Vim mouse mode, mouse interaction is sent to the application instead of the terminal. This means that clicking and dragging will no longer create a selection. Terminal selection can be forced by holding the `kbstyle(Alt)` key on Windows and Linux, this can also be done with the `kbstyle(Option)` key on macOS but requires enabling the `setting(terminal.integrated.macOptionClickForcesSelection)` setting first.
## Find
@ -288,7 +288,7 @@ This file could be committed to the repository to share with other developers or
## Working directory
By default, the terminal will open at the folder that is opened in the Explorer. The `terminal.integrated.cwd` setting allows specifying a custom path to open instead:
By default, the terminal will open at the folder that is opened in the Explorer. The `setting(terminal.integrated.cwd)` setting allows specifying a custom path to open instead:
```json
{
@ -296,7 +296,7 @@ By default, the terminal will open at the folder that is opened in the Explorer.
}
```
Split terminals on Windows will start in the directory that the parent terminal started with. On macOS and Linux, split terminals will inherit the current working directory of the parent terminal. This behavior can be changed using the `terminal.integrated.splitCwd` setting:
Split terminals on Windows will start in the directory that the parent terminal started with. On macOS and Linux, split terminals will inherit the current working directory of the parent terminal. This behavior can be changed using the `setting(terminal.integrated.splitCwd)` setting:
```json
{

Просмотреть файл

@ -210,7 +210,7 @@ When PowerShell 6+ is installed, Windows PowerShell is not included in the profi
## WSL
When running VS Code on your local machine, Windows Subsystem for Linux shells should be automatically detected. Depending on your setup, this may be a nuisance if you have a lot of distros installed. For finer control over the WSL profiles the automatic detection can be disabled with the `terminal.integrated.useWslProfiles` setting, then here's an example of how to manually configure a WSL shell:
When running VS Code on your local machine, Windows Subsystem for Linux shells should be automatically detected. Depending on your setup, this may be a nuisance if you have a lot of distros installed. For finer control over the WSL profiles the automatic detection can be disabled with the `setting(terminal.integrated.useWslProfiles)` setting, then here's an example of how to manually configure a WSL shell:
```jsonc
{

Просмотреть файл

@ -21,7 +21,7 @@ Supported shells:
### Automatic script injection
By default, the shell integration script should automatically activate on supported shells launched from VS Code. This is done by injecting arguments and/or environment variables when the shell session launches. This automatic injection can be disabled by setting `terminal.integrated.shellIntegration.enabled` to `false`.
By default, the shell integration script should automatically activate on supported shells launched from VS Code. This is done by injecting arguments and/or environment variables when the shell session launches. This automatic injection can be disabled by setting `setting(terminal.integrated.shellIntegration.enabled)` to `false`.
This standard, easy way will not work for some advanced use cases like in sub-shells, through a regular `ssh` session (when not using the [Remote - SSH extension](/docs/remote/ssh.md)) or for some complex shell setups. The recommended way to enable shell integration for those is [manual installation](#manual-installation).
@ -29,7 +29,7 @@ This standard, easy way will not work for some advanced use cases like in sub-sh
### Manual installation
To manually install shell integration, the VS Code shell integration script needs to run during your shell's initialization. Where and how to do this depends on the shell and OS you're using. When using manual install it's recommended to set `terminal.integrated.shellIntegration.enabled` to `false`, though not mandatory.
To manually install shell integration, the VS Code shell integration script needs to run during your shell's initialization. Where and how to do this depends on the shell and OS you're using. When using manual install it's recommended to set `setting(terminal.integrated.shellIntegration.enabled)` to `false`, though not mandatory.
> **Tip:** When using the [Insiders build](https://code.visualstudio.com/insiders), replace `code` with `code-insiders` below.
@ -96,7 +96,7 @@ The decorations can be interacted with to give some contextual actions like re-r
![Clicking a successful command decoration shows a context menu containing items: Copy Output, Copy Output as HTML, Rerun Command and How does this work?](images/shell-integration/decoration-menu.png)
The command and overview ruler decorations can be configured with the `terminal.integrated.shellIntegration.decorationsEnabled` setting.
The command and overview ruler decorations can be configured with the `setting(terminal.integrated.shellIntegration.decorationsEnabled)` setting.
## Command navigation
@ -108,7 +108,7 @@ The sticky scroll feature will "stick" the command that is partially showing at
![Sticky scroll will show the command at the top of the terminal viewport](images/shell-integration/sticky-scroll.png)
This can be enabled with the `terminal.integrated.stickyScroll.enabled` setting.
This can be enabled with the `setting(terminal.integrated.stickyScroll.enabled)` setting.
## Quick fixes
@ -138,7 +138,7 @@ Some other functionality of the command:
- In the current session section, there is a clipboard icon in the right of the Quick Pick that will open the command output in an editor.
- The pin action in the right of the Quick Pick can pin the command to the top of the list.
- `kbstyle(Alt)` can be held to write the text to the terminal without running it.
- The amount of history stored in the previous session section is determined by the `terminal.integrated.shellIntegration.history` setting.
- The amount of history stored in the previous session section is determined by the `setting(terminal.integrated.shellIntegration.history)` setting.
The default keybinding for this command is `kbstyle(Ctrl+Alt+R)`. However, when accessibility mode is on these are reversed; `kbstyle(Ctrl+R)` runs a recent command and `kbstyle(Ctrl+Alt+R)` sends Ctrl+R to the shell.
@ -190,7 +190,7 @@ Experimental IntelliSense for PowerShell shows a completion list when typing in
![PowerShell IntelliSense shows completions like Get-Alias, Get-ChildItem, for example when typing Get-](images/shell-integration/pwsh-IntelliSense.png)
You can enable the experimental IntelliSense for PowerShell with the `terminal.integrated.suggest.enabled` setting.
You can enable the experimental IntelliSense for PowerShell with the `setting(terminal.integrated.suggest.enabled)` setting.
```json
"terminal.integrated.suggest.enabled": true
@ -200,7 +200,7 @@ You can enable the experimental IntelliSense for PowerShell with the `terminal.i
### Git and VS Code completions
When experimental IntelliSense is enabled, completions for CLIs `git`, `code`, and `code-insiders` are turned on by default. If your PowerShell profile already has completions, you may want to turn these off by using the `terminal.integrated.suggest.builtinCompletions` setting.
When experimental IntelliSense is enabled, completions for CLIs `git`, `code`, and `code-insiders` are turned on by default. If your PowerShell profile already has completions, you may want to turn these off by using the `setting(terminal.integrated.suggest.builtinCompletions)` setting.
## Enhanced accessibility