Skip to content

Commit

Permalink
Add "paste" how-to guide (#2221)
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey authored Feb 9, 2024
1 parent 97a0083 commit 630adab
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/user/how-to.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How-to guides

This section contains some how-to guides for common tasks.

## How do I paste to a target?

`"paste to air"`

To replace a target with the contents of the clipboard, say `"paste to <target>"`.

:::info

`"to <target>"` is an example of a Destination. See [Destinations](reference/destinations.md) for more information.

:::
21 changes: 21 additions & 0 deletions docs/user/reference/destinations.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Destinations

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.

## `"to <target>"`

Replaces the target.

For example, `"paste to air"` replaces the token with a hat over the `a` with the contents of the clipboard.

## `"after <target>"`

Inserts after the target, adding delimiters as appropriate.

For example, `"paste after air"` inserts a space after the token with a hat over the `a`, followed by the contents of the clipboard.

## `"before <target>"`

Inserts before the target, adding delimiters as appropriate.

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 comments on commit 630adab

Please sign in to comment.