Add link wrap gif (#536)

* Add link wrap gif

* Add link snippet

* Change link wrap support and documentation
This commit is contained in:
Pokey Rule 2022-02-07 18:52:41 +00:00 committed by GitHub
parent a465b78997
commit 04fcbfeaa3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,17 @@
{
"link": {
"definitions": [
{
"scope": {
"langIds": [
"markdown"
]
},
"body": [
"[$text](${url:$CLIPBOARD})"
]
}
],
"description": "Link"
}
}

View File

@ -27,6 +27,7 @@ wrapper_snippets = {
"if else": "ifElseStatement.consequence",
"if": "ifStatement.consequence",
"try": "tryCatchStatement.body",
"link": "link.text",
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -1,6 +1,7 @@
# Wrapper snippets
![Wrapper snippet demo](images/tryWrapFine.gif)
![Link wrap](images/linkWrap.gif)
In addition to wrapping with paired delimiters (eg `"square wrap"`, `"round wrap"`, etc), we experimentally support wrapping with snippets. Cursorless ships with a few built-in snippets, but users can also use their own snippets.
@ -39,6 +40,7 @@ Each snippet wrapper has a default scope type. When you refer to a target, by de
| `"else wrap"` | If-else statement; target goes in else branch | Statement |
| `"if else wrap"` | If-else statement; target goes in if branch | Statement |
| `"try wrap"` | Try-catch statement | Statement |
| `"link wrap"` | Markdown link | |
## Customizing spoken forms