mirror of
https://github.com/cursorless-dev/cursorless.git
synced 2024-10-03 20:37:50 +03:00
Add tutorial: Cloning a talon list
This commit is contained in:
parent
be21ac43e8
commit
1cb58073b2
@ -0,0 +1,52 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: bring block made
|
||||
action:
|
||||
name: replaceWithTarget
|
||||
source:
|
||||
type: primitive
|
||||
modifiers:
|
||||
- type: containingScope
|
||||
scopeType: {type: paragraph}
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: m}
|
||||
destination: {type: implicit}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |+
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
selections:
|
||||
- anchor: {line: 10, character: 0}
|
||||
active: {line: 10, character: 0}
|
||||
marks:
|
||||
default.m:
|
||||
start: {line: 5, character: 0}
|
||||
end: {line: 5, character: 3}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 13, character: 1}
|
||||
active: {line: 13, character: 1}
|
@ -0,0 +1,56 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: change inside pair sun
|
||||
action:
|
||||
name: clearAndSetSelection
|
||||
target:
|
||||
type: primitive
|
||||
modifiers:
|
||||
- {type: interiorOnly}
|
||||
- type: containingScope
|
||||
scopeType: {type: surroundingPair, delimiter: any}
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: s}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 10, character: 30}
|
||||
active: {line: 10, character: 30}
|
||||
marks:
|
||||
default.s:
|
||||
start: {line: 12, character: 5}
|
||||
end: {line: 12, character: 11}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 12, character: 5}
|
||||
active: {line: 12, character: 5}
|
@ -0,0 +1,58 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: change inside pair yank
|
||||
action:
|
||||
name: clearAndSetSelection
|
||||
target:
|
||||
type: primitive
|
||||
modifiers:
|
||||
- {type: interiorOnly}
|
||||
- type: containingScope
|
||||
scopeType: {type: surroundingPair, delimiter: any}
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: 'y'}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="My tutorial list")
|
||||
ctx.list['user.emoji'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 10, character: 15}
|
||||
active: {line: 10, character: 15}
|
||||
- anchor: {line: 11, character: 20}
|
||||
active: {line: 11, character: 20}
|
||||
marks:
|
||||
default.y:
|
||||
start: {line: 10, character: 24}
|
||||
end: {line: 10, character: 26}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="")
|
||||
ctx.list['user.emoji'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 10, character: 24}
|
||||
active: {line: 10, character: 24}
|
@ -0,0 +1,61 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: change underscore and cap
|
||||
action:
|
||||
name: clearAndSetSelection
|
||||
target:
|
||||
type: list
|
||||
elements:
|
||||
- type: primitive
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: _}
|
||||
- type: primitive
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: c}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 13, character: 1}
|
||||
active: {line: 13, character: 1}
|
||||
marks:
|
||||
default._:
|
||||
start: {line: 10, character: 10}
|
||||
end: {line: 10, character: 37}
|
||||
default.c:
|
||||
start: {line: 11, character: 15}
|
||||
end: {line: 11, character: 42}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("", desc="My tutorial list")
|
||||
ctx.list['user.'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 10, character: 10}
|
||||
active: {line: 10, character: 10}
|
||||
- anchor: {line: 11, character: 15}
|
||||
active: {line: 11, character: 15}
|
@ -0,0 +1,54 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: change right paren
|
||||
action:
|
||||
name: clearAndSetSelection
|
||||
target:
|
||||
type: primitive
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: )}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": ":-)",
|
||||
"frown": ":-)",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 13, character: 10}
|
||||
active: {line: 13, character: 10}
|
||||
marks:
|
||||
default.):
|
||||
start: {line: 13, character: 16}
|
||||
end: {line: 13, character: 17}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": ":-)",
|
||||
"frown": ":-",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 13, character: 16}
|
||||
active: {line: 13, character: 16}
|
@ -0,0 +1,52 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: change whale
|
||||
action:
|
||||
name: clearAndSetSelection
|
||||
target:
|
||||
type: primitive
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: w}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": "whatever",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 12, character: 10}
|
||||
active: {line: 12, character: 10}
|
||||
marks:
|
||||
default.w:
|
||||
start: {line: 12, character: 14}
|
||||
end: {line: 12, character: 22}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": "",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 12, character: 14}
|
||||
active: {line: 12, character: 14}
|
@ -0,0 +1,4 @@
|
||||
{
|
||||
"title": "Cloning a talon list",
|
||||
"steps": []
|
||||
}
|
@ -0,0 +1,52 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: take look
|
||||
action:
|
||||
name: setSelection
|
||||
target:
|
||||
type: primitive
|
||||
mark: {type: decoratedSymbol, symbolColor: default, character: l}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": ":-)",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 12, character: 17}
|
||||
active: {line: 12, character: 17}
|
||||
marks:
|
||||
default.l:
|
||||
start: {line: 12, character: 5}
|
||||
end: {line: 12, character: 10}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": ":-)",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 12, character: 5}
|
||||
active: {line: 12, character: 10}
|
@ -0,0 +1,52 @@
|
||||
languageId: python
|
||||
command:
|
||||
version: 6
|
||||
spokenForm: clone line
|
||||
action:
|
||||
name: insertCopyAfter
|
||||
target:
|
||||
type: primitive
|
||||
modifiers:
|
||||
- type: containingScope
|
||||
scopeType: {type: line}
|
||||
usePrePhraseSnapshot: false
|
||||
initialState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": ":-)",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 12, character: 5}
|
||||
active: {line: 12, character: 10}
|
||||
marks: {}
|
||||
finalState:
|
||||
documentContents: |-
|
||||
from talon import Context, Module
|
||||
|
||||
mod = Module()
|
||||
ctx = Context()
|
||||
|
||||
mod.list("cursorless_walkthrough_list", desc="My tutorial list")
|
||||
ctx.list['user.cursorless_walkthrough_list'] = {
|
||||
"spoken form": "whatever",
|
||||
}
|
||||
|
||||
mod.list("emoji", desc="Emojis")
|
||||
ctx.list['user.emoji'] = {
|
||||
"smile": ":-)",
|
||||
"smile": ":-)",
|
||||
}
|
||||
selections:
|
||||
- anchor: {line: 13, character: 5}
|
||||
active: {line: 13, character: 10}
|
Loading…
Reference in New Issue
Block a user