Repository navigation
Add remaining 1.3 release features #119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
36a716a
43f0e73
73e8b4c
6d20ada
2d7de19
b6f061a
905ce8f
03e49a7
3dc0ada
128030e
0364da3
c474aa4
eafb007
022c61b
0eea38e
eac4314
d0da0dc
4c05d98
fda2bc1
1d75e22
486abea
d3c7454
67d5e0c
d43f817
7b9e37d
8a69f31
cf82dd6
b21b4cf
776b19f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,165 @@ | ||
| --- | ||
| title: Windows Terminal Command Palette | ||
| description: Learn how to use the command palette in the Windows Terminal. | ||
| author: cinnamon-msft | ||
| ms.author: cinnamon | ||
| ms.date: 08/26/2020 | ||
| ms.topic: how-to | ||
| ms.service: terminal | ||
| --- | ||
|
|
||
| # How to use the command palette in Windows Terminal ([Preview](https://aka.ms/terminal-preview/)) | ||
|
|
||
| > [!IMPORTANT] | ||
| > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview/). | ||
|
|
||
| The command palette lets you see which commands you can run inside Windows Terminal. | ||
|
|
||
| ## Invoking the command palette | ||
|
|
||
| You can invoke the command palette by typing `ctrl+shift+p`. This can be customized by adding the `commandPalette` command to your key bindings. | ||
|
|
||
| ```json | ||
| { "command": "commandPalette", "keys": "ctrl+shift+p" } | ||
| ``` | ||
|
|
||
| ## Command line mode | ||
|
|
||
| If you'd like to enter a `wt` command into the command palette, you can do so by starting with the `>` character. This will run the `wt` command in the current window. More information on `wt` commands can be found on the [Command line arguments page](./command-line-arguments.md). | ||
|
|
||
|  | ||
|
|
||
| ## Defining commands | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, I recommend rewriting this section from the ground up. How about a structure like this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Note: don't forget to probably update the key bindings page too. We have "keys" as required. So now it technically isn't?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't disagree with Carlos here.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At no point do we explain where commands come from in the file. We probably need to add a paragraph that covers something like:
and make sure we specifically show that the commands are getting added to |
||
|
|
||
| Commands are automatically generated for each of the actions in your `keybindings`, when possible. If you'd like to add other commands to the command palette, you can define them in three different ways. | ||
|
|
||
| #### With a value for `keys` without a `name` | ||
|
|
||
| This is the behavior that is documented on the [Key bindings page](./customize-settings/key-bindings.md). These commands can be invoked with the defined key binding. The commands will appear in the command palette if Windows Terminal can autogenerate a reasonable name for it. | ||
|
|
||
| ```json | ||
| { "command": "newTab", "keys": "ctrl+shift+t" } | ||
| ``` | ||
|
|
||
| #### Without a value for `keys`, but with a `name` | ||
|
|
||
| These commands will only be added to the command palette. They cannot be invoked with a key binding. `name` overrides the autogenerated name. | ||
|
|
||
| ```json | ||
| { "name": "Open my default tab", "command": "newTab" } | ||
| ``` | ||
|
|
||
| #### With a value for `keys` with a `name` | ||
|
|
||
| These commands will be added to the command palette and can be invoked with the keyboard. The `name` property will override the autogenerated name. | ||
|
|
||
| ```json | ||
| { "name": "New tab", "command": "newTab", "keys": "ctrl+shift+t" } | ||
| ``` | ||
|
|
||
| ### Adding an icon | ||
|
|
||
| You can optionally add an icon to a command that appears in the command palette. This can be done by adding the `icon` property to the command. Icons can be a path to an image, a symbol from [Segoe MDL2 Assets](https://docs.microsoft.com/windows/uwp/design/style/segoe-ui-symbol-font), or any character, including emojis. | ||
|
|
||
| ```json | ||
| { "icon": "C:\\Images\\my-icon.png", "name": "New tab", "command": "newTab", "keys": "ctrl+shift+t" }, | ||
| { "icon": "\uE756", "name": "New tab", "command": "newTab", "keys": "ctrl+shift+t" }, | ||
| { "icon": "⚡", "name": "New tab", "command": "newTab", "keys": "ctrl+shift+t" } | ||
| ``` | ||
|
|
||
|
cinnamon-msft marked this conversation as resolved.
Resolved
|
||
| ### Nested commands | ||
|
|
||
| Nested commands let you group multiple commands under one item in the command palette. The example below groups the font resize commands under one command palette item called "Change font size...". | ||
|
|
||
| ```json | ||
| { | ||
| "name": "Change font size...", | ||
| "commands": [ | ||
| { "command": { "action": "adjustFontSize", "delta": 1 } }, | ||
| { "command": { "action": "adjustFontSize", "delta": -1 } }, | ||
| { "command": "resetFontSize" }, | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
|  | ||
|
|
||
| ### Iterable commands | ||
|
|
||
| Iterable commands let you create multiple commands at the same time, generated from other objects defined in your settings. Currently, you can create iterable commands for your profiles and color schemes. At runtime, these commands will be expanded to one command for each of the objects of the given type. | ||
|
|
||
| You can currently iterate over the following properties: | ||
|
|
||
| | `iterateOn` | Property | Property syntax | | ||
| | ----------- | -------- | --------------- | | ||
| | `profiles` | `name` | `"name": "${profile.name}"` | | ||
| | `profiles` | `icon` | `"icon": "${profile.icon}"` | | ||
| | `schemes` | `name` | `"name": "${scheme.name}"` | | ||
|
|
||
| #### Example | ||
|
|
||
| Create a new tab command for each profile. | ||
|
|
||
|  | ||
|
|
||
| ```json | ||
| { | ||
| "name": "New tab", | ||
| "commands": [ | ||
| { | ||
| "iterateOn": "profiles", | ||
| "icon": "${profile.icon}", | ||
| "name": "${profile.name}", | ||
| "command": { "action": "newTab", "profile": "${profile.name}" } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| In the above example: | ||
|
|
||
| - `"iterateOn": "profiles"` will generate a command for each profile. | ||
| - At runtime, the terminal will replace `${profile.icon}` with each profile's icon and `${profile.name}` with each profile's name. | ||
|
|
||
| If you had three profiles: | ||
|
|
||
| ```json | ||
| "profiles": [ | ||
| { "name": "Command Prompt", "icon": null }, | ||
| { "name": "PowerShell", "icon": "C:\\path\\to\\icon.png" }, | ||
| { "name": "Ubuntu", "icon": null }, | ||
| ] | ||
| ``` | ||
|
|
||
| The above command would behave like the following three commands: | ||
|
|
||
| ```json | ||
| { | ||
| "name": "New tab...", | ||
| "commands": [ | ||
| { | ||
| "icon": null, | ||
| "name": "Command Prompt", | ||
| "command": { "action": "newTab", "profile": "Command Prompt" } | ||
| }, | ||
| { | ||
| "icon": "C:\\path\\to\\icon", | ||
| "name": "PowerShell", | ||
| "command": { "action": "newTab", "profile": "PowerShell" } | ||
| }, | ||
| { | ||
| "icon": null, | ||
| "name": "Ubuntu", | ||
| "command": { "action": "newTab", "profile": "Ubuntu" } | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| ## Hiding a command | ||
|
|
||
| If you would like to keep a command in your key bindings list but not have it appear in the command palette, you can hide it by setting its `name` to `null`. The example below hides the "New tab" action from the command palette. | ||
|
|
||
| ```json | ||
| { "name": null, "command": "newTab", "keys": "ctrl+shift+t" } | ||
| ``` | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ title: Windows Terminal Global Settings | |
| description: Learn how to customize the global settings within Windows Terminal. | ||
| author: cinnamon-msft | ||
| ms.author: cinnamon | ||
| ms.date: 07/21/2020 | ||
| ms.date: 08/26/2020 | ||
| ms.topic: how-to | ||
| ms.service: terminal | ||
| ms.localizationpriority: high | ||
|
|
@@ -73,6 +73,32 @@ ___ | |
|
|
||
| ## Tab settings | ||
|
|
||
| ### Use tab switcher experience ([Preview](https://aka.ms/terminal-preview)) | ||
|
|
||
| :::row::: | ||
| :::column span=""::: | ||
| When this is set to `true`, the `nextTab` and `prevTab` commands will use the tab switcher UI. The UI will show all the currently open tabs in a vertical list, navigable with the keyboard or mouse. | ||
|
|
||
| The tab switcher will open on the initial press of the keybindings for `nextTab` and `prevTab`, and will stay open as long as a modifier key is held down. When all modifier keys are released, the switcher will close and the highlighted tab will be focused. <kbd>tab</kbd>/<kbd>shift+tab</kbd>, the <kbd>up</kbd> and <kbd>down</kbd> arrow keys, and the `nextTab`/`prevTab` keybindings can be used to cycle through the switcher UI. | ||
|
|
||
| **Property name:** `useTabSwitcher` | ||
|
|
||
| **Necessity:** Optional | ||
|
|
||
| **Accepts:** `true`, `false` | ||
|
|
||
| **Default value:** `true` | ||
|
|
||
| :::column-end::: | ||
| :::column span=""::: | ||
|  | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there supposed to be a gif here?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah it's still on the issue checklist. I'll be creating gifs tonight. |
||
| :::column-end::: | ||
| :::row-end::: | ||
|
|
||
| > [!IMPORTANT] | ||
| > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview/). | ||
|
|
||
| ### Always show tabs | ||
|
|
||
| :::row::: | ||
|
|
@@ -202,7 +228,7 @@ This is the number of rows displayed in the window upon first load. If `launchMo | |
|
|
||
| **Default value:** `30` | ||
|
|
||
| ### Always on top mode ([Preview](https://aka.ms/terminal-preview/)) | ||
| ### Always on top mode | ||
|
|
||
| When set to true, Windows Terminal windows will launch on top of all other windows on the desktop. This state can also be toggled with the `toggleAlwaysOnTop` key binding. | ||
|
|
||
|
|
@@ -214,9 +240,6 @@ When set to true, Windows Terminal windows will launch on top of all other windo | |
|
|
||
| **Default value:** `false` | ||
|
|
||
| > [!IMPORTANT] | ||
| > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview/). | ||
|
|
||
| <br /> | ||
|
|
||
| ___ | ||
|
|
@@ -286,6 +309,9 @@ When this is set to `true`, the color and font formatting of the selected text i | |
|
|
||
| **Default value:** `false` | ||
|
|
||
| > [!IMPORTANT] | ||
| > `"all"`, `"none"`, `"html"`, and `"rtf"` are only available in [Windows Terminal Preview](https://aka.ms/terminal-preview/). | ||
|
|
||
| ### Word delimiters | ||
|
|
||
| This determines the word delimiters used in a double-click selection. Word delimiters are characters that specify where the boundary is between two words. The most common examples are spaces, semicolons, commas, and periods. | ||
|
|
@@ -304,7 +330,7 @@ ___ | |
|
|
||
| ## Paste warnings | ||
|
|
||
| ### Warn when the text to paste is very large ([Preview](https://aka.ms/terminal-preview/)) | ||
| ### Warn when the text to paste is very large | ||
|
|
||
| When this is set to `true`, trying to paste text with more than 5 KiB of characters will display a dialog asking you whether to continue or not with the paste. When it's set to `false`, the dialog is not shown and instead the text is pasted right away. If you often right-click on the terminal by accident after having selected a lot of text, this might be useful to prevent the terminal from becoming unresponsive while the program connected to the terminal receives the clipboard's content. | ||
|
|
||
|
|
@@ -316,10 +342,7 @@ When this is set to `true`, trying to paste text with more than 5 KiB of charact | |
|
|
||
| **Default value:** `true` | ||
|
|
||
| > [!IMPORTANT] | ||
| > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview/). | ||
|
|
||
| ### Warn when the text to paste contains multiple lines ([Preview](https://aka.ms/terminal-preview/)) | ||
| ### Warn when the text to paste contains multiple lines | ||
|
|
||
| When this is set to `true`, trying to paste text with multiple lines will display a dialog asking you whether to continue or not with the paste. When it's set to `false`, the dialog is not shown and instead the text is pasted right away. In most shells, one line corresponds to one command so if you paste text that contains the "new line" character into a shell, one or more command(s) might be executed automatically upon paste, without you having time to validate the commands. This can be useful if you often copy and paste commands from untrusted websites. | ||
|
|
||
|
|
@@ -331,9 +354,6 @@ When this is set to `true`, trying to paste text with multiple lines will displa | |
|
|
||
| **Default value:** `true` | ||
|
|
||
| > [!IMPORTANT] | ||
| > This feature is only available in [Windows Terminal Preview](https://aka.ms/terminal-preview/). | ||
|
|
||
| <br /> | ||
|
|
||
| ___ | ||
|
|
@@ -351,7 +371,7 @@ This is the number of rows to scroll at a time with the mouse wheel. This will o | |
| **Default value:** `"system"` | ||
|
|
||
| > [!CAUTION] | ||
| > The `rowsToScroll` setting is no longer available in [Windows Terminal Preview](https://aka.ms/terminal-preview/), version 1.2. This version of Windows Terminal will always use the value configured in the system Mouse settings panel. | ||
| > The `rowsToScroll` setting is no longer available versions 1.2 and later. Windows Terminal will use the value configured in the system Mouse settings panel. | ||
|
|
||
| <br /> | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.