Skip to content

Commit

Permalink
Add tutorial: Cloning a talon list
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Jul 12, 2024
1 parent fd8061e commit 3a47468
Show file tree
Hide file tree
Showing 9 changed files with 441 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -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}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"title": "Cloning a talon list",
"steps": []
}
Original file line number Diff line number Diff line change
@@ -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}
Loading

0 comments on commit 3a47468

Please sign in to comment.