3.5 KiB
VS Code support
Installing several Talon community-developed VS Code extensions will improve your experience.
The VS Code Talon extension pack enables a couple advanced commands and improves the speed/robustness of Talon issuing VS Code commands.
The Andreas Talon extension (dependent on the command server in the extension pack) adds additional commands and useful features for editing your Talon configuration in VS Code.
Cursorless
If you'd like to use Cursorless, follow the instructions on the Cursorless site.
Terminal
By default, Talon cannot recognize that you have the VS Code integrated terminal focused, so the terminal
tag is never active in VS Code. Your goal is for the VS Code window title to reflect whether a terminal is focused, then to match the title in your Talon configuration. You can do so in two ways.
Note that the full window title may not be displayed at the top of VS Code windows. To be sure you are seeing the whole title, say help scope and watch Misc > win.title
in the scope window that appears.
Option 1: Add focused view to window title
Change the window.title
setting to:
${activeEditorShort}${separator}${rootName}${separator}${profileName}${separator}focus:[${focusedView}]
This causes VS Code to include focus:[Terminal]
in the window title whenever the terminal is focused (e.g. by saying panel terminal). Community's VS Code support looks for this string in the window title and activates the terminal tag.
If you have existing customizations to your window title you want to keep, ensure that focus:[${focusedView}]
appears somewhere within your custom window.title
.
To enable terminal commands, create a file in your Talon user directory that matches the terminal tag in VS Code, and activates any tags for commands you have installed/want to use, for example:
app: vscode
tag: terminal
-
tag(): user.generic_unix_shell
tag(): user.git
tag(): user.kubectl
tag(): user.readline
Option 2: Open VS Code integrated terminals as editors
This option lets you enable different voice commands based on what is running in the terminal — for example, if you use both PowerShell and WSL in VS Code integrated terminals.
Change the terminal.integrated.defaultLocation
setting to editor
. Then, create a terminal with the voice command terminal new.
In an otherwise-default VS Code setup, the first part of the window title as displayed in help scope is the currently-running process, e.g. zsh
or powershell
; this is also displayed in the tab title. You can customize the terminal tab title/part of the window title with the terminal.integrated.tabs.title
setting.
To enable terminal commands, create one or more files in your Talon user directory that match the first portion of the window title, and activates both the terminal
tag and any tags for commands you have installed/want to use. For example:
app: vscode
win.title: /^zsh /
-
tag(): terminal
tag(): user.generic_unix_shell
tag(): user.git
tag(): user.readline
app: vscode
win.title: /^powershell /
-
tag(): terminal
tag(): user.generic_windows_shell
tag(): user.git