Skip to content

Commit 630adab

Browse files
authored
Add "paste" how-to guide (#2221)
## Checklist - [-] I have added [tests](https://www.cursorless.org/docs/contributing/test-case-recorder/) - [x] 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
1 parent 97a0083 commit 630adab

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

docs/user/how-to.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# How-to guides
2+
3+
This section contains some how-to guides for common tasks.
4+
5+
## How do I paste to a target?
6+
7+
`"paste to air"`
8+
9+
To replace a target with the contents of the clipboard, say `"paste to <target>"`.
10+
11+
:::info
12+
13+
`"to <target>"` is an example of a Destination. See [Destinations](reference/destinations.md) for more information.
14+
15+
:::

docs/user/reference/destinations.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Destinations
2+
3+
Some actions expect a destination, rather than a target. Destinations combine a preposition and a target, to define a place and behavior for a Cursorless action.
4+
5+
## `"to <target>"`
6+
7+
Replaces the target.
8+
9+
For example, `"paste to air"` replaces the token with a hat over the `a` with the contents of the clipboard.
10+
11+
## `"after <target>"`
12+
13+
Inserts after the target, adding delimiters as appropriate.
14+
15+
For example, `"paste after air"` inserts a space after the token with a hat over the `a`, followed by the contents of the clipboard.
16+
17+
## `"before <target>"`
18+
19+
Inserts before the target, adding delimiters as appropriate.
20+
21+
For example, `"paste before air"` inserts a space before the token with a hat over the `a`, then places the contents of the clipboard before the space.

0 commit comments

Comments
 (0)