From 128933aec052cb4ac957d4071b0b976be0c34b64 Mon Sep 17 00:00:00 2001 From: Pokey Rule <755842+pokey@users.noreply.github.com> Date: Thu, 28 Sep 2023 11:31:22 +0100 Subject: [PATCH] knausj => community (#1914) Also tweaked unicode docs slightly while I was there ## Checklist - [ ] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [ ] I have updated the [docs](https://github.com/cursorless-dev/cursorless/tree/main/docs) and [cheatsheet](https://github.com/cursorless-dev/cursorless/tree/main/cursorless-talon/src/cheatsheet) - [ ] I have not broken the cheatsheet --- CHANGELOG.md | 2 +- docs/contributing/architecture/hat-snapshots.md | 2 +- docs/user/experimental/snippets.md | 2 +- docs/user/installation.md | 16 ++++++++-------- docs/user/unicode.md | 4 ++-- packages/common/src/cursorlessCommandIds.ts | 2 +- .../tokenGraphemeSplitter.ts | 2 +- packages/cursorless-vscode/package.json | 2 +- 8 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c47102693f..8a1817e535 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -139,7 +139,7 @@ There's too much new stuff in this release to fit in a highlights reel, so we'll - Improve and unify selection updating behaviour to handle overlapping ranges [\#138](https://github.com/cursorless-dev/cursorless/issues/138) - Duplicate symbols after VS Code update [\#111](https://github.com/cursorless-dev/cursorless/issues/111) - Fold action not working properly with multiple list elements [\#39](https://github.com/cursorless-dev/cursorless/issues/39) -- The `clear` command clashes with Knausj commands [\#68](https://github.com/pokey/cursorless-talon/issues/68) +- The `clear` command clashes with community commands [\#68](https://github.com/pokey/cursorless-talon/issues/68) **Closed issues:** diff --git a/docs/contributing/architecture/hat-snapshots.md b/docs/contributing/architecture/hat-snapshots.md index 1ead256699..de4c33c4f3 100644 --- a/docs/contributing/architecture/hat-snapshots.md +++ b/docs/contributing/architecture/hat-snapshots.md @@ -2,7 +2,7 @@ In order to allow long chained command phrases, we take a snapshot of the hat token map at the start of a phrase and continue to use this map during the course of the entire phrase. This way you can be sure that any commands issued during the course of a single phrase that refer to a decorated token will continue to refer to the same logical token no matter what happens in the document during phrase execution. Note that the ranges of tokens will be kept current as the document changes so that they refer to the same logical range, but the same logical token will keep the same key in the hat token map over the course of a phrase. -To make this work, first the voice engine [touches](https://github.com/knausj85/knausj_talon/blob/e373780af16256ab8fd5638af32d97fa23c4c0fc/apps/vscode/command_client/command_client.py#L398) a file within the signals subdirectory of the command server communication directory after the phrase has been parsed but right before execution begins. Then cursorless will check the version of the signal file before it [reads](https://github.com/cursorless-dev/cursorless/blob/2a624888369d41b0531e472d001d63d09912c8aa/src/core/HatTokenMap.ts#L88) or [updates](https://github.com/cursorless-dev/cursorless/blob/0d1004bafc6764734bee62afbfbb02500630a264/src/core/HatTokenMap.ts#L70) the hat token map via the command server [signal API](https://github.com/pokey/command-server/blob/2b9f9ea2a38b6e95aa60ff9553a804165e527308/src/extension.ts#L29). If the signal has been emitted since the last time cursorless took a snapshot of the hat token map, it will take a new snapshot and continue to use that snapshot of the hats until the next time the signal is emitted. Note that the signal transmission is asynchronous so cursorless just needs to make sure to check the version of the signal before it either updates or reads the map. +To make this work, first the voice engine [touches](https://github.com/talonhub/community/blob/e373780af16256ab8fd5638af32d97fa23c4c0fc/apps/vscode/command_client/command_client.py#L398) a file within the signals subdirectory of the command server communication directory after the phrase has been parsed but right before execution begins. Then cursorless will check the version of the signal file before it [reads](https://github.com/cursorless-dev/cursorless/blob/2a624888369d41b0531e472d001d63d09912c8aa/src/core/HatTokenMap.ts#L88) or [updates](https://github.com/cursorless-dev/cursorless/blob/0d1004bafc6764734bee62afbfbb02500630a264/src/core/HatTokenMap.ts#L70) the hat token map via the command server [signal API](https://github.com/pokey/command-server/blob/2b9f9ea2a38b6e95aa60ff9553a804165e527308/src/extension.ts#L29). If the signal has been emitted since the last time cursorless took a snapshot of the hat token map, it will take a new snapshot and continue to use that snapshot of the hats until the next time the signal is emitted. Note that the signal transmission is asynchronous so cursorless just needs to make sure to check the version of the signal before it either updates or reads the map. In the diagram below, we document the flow of a couple different cases. Dotted lines represent asynchronous / fire-and-forget communication: diff --git a/docs/user/experimental/snippets.md b/docs/user/experimental/snippets.md index 86f7c8535d..a53aa03f80 100644 --- a/docs/user/experimental/snippets.md +++ b/docs/user/experimental/snippets.md @@ -92,7 +92,7 @@ Note that each snippet can use `insertionScopeTypes` to indicate that it will au As usual, the spoken forms for these snippets can be [customized by csv](../customization.md). The csvs are in the files in `cursorless-settings/experimental` with `snippet` in their name. -In addition, you can change the term `"snippet"` (for snippet insertion) using actions.csv. Keep in mind that if you change it to `"snip"`, you may want to turn off the built-in knausj `"snip"` commands to avoid conflicts. +In addition, you can change the term `"snippet"` (for snippet insertion) using actions.csv. Keep in mind that if you change it to `"snip"`, you may want to turn off the built-in community `"snip"` commands to avoid conflicts. ## Adding your own snippets diff --git a/docs/user/installation.md b/docs/user/installation.md index 88ce69c42c..ce9adcbeb2 100644 --- a/docs/user/installation.md +++ b/docs/user/installation.md @@ -1,8 +1,8 @@ # Installation 1. Install [Talon](https://talonvoice.com/) -2. Install [knausj_talon](https://github.com/knausj85/knausj_talon). - _(Or see [here](https://github.com/cursorless-dev/cursorless/wiki/Talon-home-requirements) if you prefer not to use knausj.)_ +2. Install the [community Talon commands](https://github.com/talonhub/community). + _(Or see [here](https://github.com/cursorless-dev/cursorless/wiki/Talon-home-requirements) if you prefer not to use community.)_ 3. Install [VSCode](https://code.visualstudio.com/) 4. Install the [VSCode talon extension pack](https://marketplace.visualstudio.com/items?itemName=pokey.talon) 5. Install the [Cursorless VSCode extension](https://marketplace.visualstudio.com/items?itemName=pokey.cursorless) @@ -25,9 +25,9 @@ Alternatively, access the directory by right clicking the Talon icon in taskbar, The folder structure should look something like the below: ```insert code: -~/.talon/user/knausj_talon -~/.talon/user/knausj_talon/apps -~/.talon/user/knausj_talon/code +~/.talon/user/community +~/.talon/user/community/apps +~/.talon/user/community/code ... ~/.talon/user/cursorless-talon ~/.talon/user/cursorless-talon/src @@ -50,9 +50,9 @@ Alternatively, access the directory by right clicking the Talon icon in taskbar, The folder structure should look something like the below: ```insert code: -%AppData%\Talon\user\knausj_talon -%AppData%\Talon\user\knausj_talon\apps -%AppData%\Talon\user\knausj_talon\code +%AppData%\Talon\user\community +%AppData%\Talon\user\community\apps +%AppData%\Talon\user\community\code ... %AppData%\Talon\user\cursorless-talon %AppData%\Talon\user\cursorless-talon\src diff --git a/docs/user/unicode.md b/docs/user/unicode.md index 16195191a1..a8680e88f4 100644 --- a/docs/user/unicode.md +++ b/docs/user/unicode.md @@ -7,11 +7,11 @@ Cursorless has first-class support for Unicode. By default, when constructing ha - Africa - รfrica -For Unicode symbols that are not letters, and that are not speakable in knausj, for example emoji, Chinese characters, etc, we have a special "character" called `"special"` that can be used. So for example, if there were a blue hat over a '๐Ÿ˜„' character, you could say `"take blue special"` to select it. As always, the spoken form `"special"` can be [customized](customization.md). +For Unicode symbols that are not letters, and that are not speakable by default, for example emoji, Chinese characters, etc, we have a special "character" called `"special"` that can be used. So for example, if there were a blue hat over a '๐Ÿ˜„' character, you could say `"take blue special"` to select it. As always, the spoken form `"special"` can be [customized](customization.md). ## Advanced customization -The above setup will allow you to refer to any Unicode token. However, if you have overridden your `` capture to contain characters other than lowercase letters and the default knausj symbols, you can tell Cursorless to be less aggressive with its normalization, so that it can allocate hats more efficiently. +The above setup will allow you to refer to any Unicode token, and is sufficient for most users. However, if you have overridden your `` capture to contain characters other than lowercase letters and the default symbols, you can tell Cursorless to be less aggressive with its normalization, so that it can allocate hats more efficiently. Note that this is not necessary in order to refer to these tokens; it just makes hat allocation slightly more efficient. ### Preserving case diff --git a/packages/common/src/cursorlessCommandIds.ts b/packages/common/src/cursorlessCommandIds.ts index cf0edd10aa..f1c69de9f5 100644 --- a/packages/common/src/cursorlessCommandIds.ts +++ b/packages/common/src/cursorlessCommandIds.ts @@ -78,7 +78,7 @@ export const cursorlessCommandDescriptions: Record< "Display the cursorless cheatsheet", ), ["cursorless.internal.updateCheatsheetDefaults"]: new HiddenCommand( - "Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock knausj and cursorless.", + "Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock community and cursorless.", ), ["cursorless.takeSnapshot"]: new HiddenCommand( "Take a snapshot of the current editor state", diff --git a/packages/cursorless-engine/src/tokenGraphemeSplitter/tokenGraphemeSplitter.ts b/packages/cursorless-engine/src/tokenGraphemeSplitter/tokenGraphemeSplitter.ts index 116bcd75e5..456f6f968a 100644 --- a/packages/cursorless-engine/src/tokenGraphemeSplitter/tokenGraphemeSplitter.ts +++ b/packages/cursorless-engine/src/tokenGraphemeSplitter/tokenGraphemeSplitter.ts @@ -8,7 +8,7 @@ import { import { matchAll } from "../util/regex"; /** - * A list of all symbols that are speakable by default in knausj. + * A list of all symbols that are speakable by default in community. */ const KNOWN_SYMBOLS = [ "!", diff --git a/packages/cursorless-vscode/package.json b/packages/cursorless-vscode/package.json index 584de90030..6257845faf 100644 --- a/packages/cursorless-vscode/package.json +++ b/packages/cursorless-vscode/package.json @@ -123,7 +123,7 @@ }, { "command": "cursorless.internal.updateCheatsheetDefaults", - "title": "Cursorless: Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock knausj and cursorless.", + "title": "Cursorless: Update the default values of the cheatsheet payload used on the website and for local development. Be sure to run this on stock community and cursorless.", "enablement": "false" }, {