Skip to content

Commit c540ec4

Browse files
committed
Finished first draft of basic tutorial
1 parent 4374f40 commit c540ec4

File tree

10 files changed

+379
-16
lines changed

10 files changed

+379
-16
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
==================================================
2+
========== ==========
3+
========== Welcome to Cursorless! ==========
4+
========== ==========
5+
========== Let's start using marks ==========
6+
========== ==========
7+
========== So we can navigate around ==========
8+
========== ==========
9+
========== Without lifting a finger! ==========
10+
========== ==========
11+
==================================================
Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
languageId: plaintext
22
command:
3-
version: 0
3+
version: 1
44
spokenForm: chuck drum
55
action: remove
66
targets:
77
- type: primitive
8-
mark: {type: decoratedSymbol, symbolColor: default, character: d, usePrePhraseSnapshot: true}
8+
mark: {type: decoratedSymbol, symbolColor: default, character: d}
99
initialState:
1010
documentContents: |-
1111
==================================================
@@ -14,16 +14,16 @@ initialState:
1414
========== ==========
1515
========== Let's start using marks ==========
1616
========== ==========
17-
========== so we can navigate around ==========
17+
========== So we can navigate around ==========
1818
========== ==========
19-
========== without lifting a finger! ==========
19+
========== Without lifting a finger! ==========
2020
========== ==========
2121
==================================================
2222
selections:
23+
- anchor: {line: 2, character: 14}
24+
active: {line: 2, character: 21}
2325
- anchor: {line: 6, character: 15}
2426
active: {line: 6, character: 17}
25-
- anchor: {line: 6, character: 22}
26-
active: {line: 6, character: 30}
2727
marks:
2828
default.d:
2929
start: {line: 6, character: 31}
@@ -36,17 +36,17 @@ finalState:
3636
========== ==========
3737
========== Let's start using marks ==========
3838
========== ==========
39-
========== so we can navigate ==========
39+
========== So we can navigate ==========
4040
========== ==========
41-
========== without lifting a finger! ==========
41+
========== Without lifting a finger! ==========
4242
========== ==========
4343
==================================================
4444
selections:
45+
- anchor: {line: 2, character: 14}
46+
active: {line: 2, character: 21}
4547
- anchor: {line: 6, character: 15}
4648
active: {line: 6, character: 17}
47-
- anchor: {line: 6, character: 22}
48-
active: {line: 6, character: 30}
4949
thatMark:
5050
- anchor: {line: 6, character: 31}
5151
active: {line: 6, character: 31}
52-
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: d, usePrePhraseSnapshot: true}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: identity}}]
52+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: d}, selectionType: token, position: contents, insideOutsideType: outside, modifier: {type: identity}}]
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
languageId: plaintext
2+
command:
3+
version: 1
4+
spokenForm: chuck line look
5+
action: remove
6+
targets:
7+
- type: primitive
8+
selectionType: line
9+
mark: {type: decoratedSymbol, symbolColor: default, character: l}
10+
initialState:
11+
documentContents: |-
12+
==================================================
13+
========== ==========
14+
========== Welcome to Cursorless! ==========
15+
========== ==========
16+
========== Let's start using marks ==========
17+
========== ==========
18+
========== So we can navigate ==========
19+
========== ==========
20+
========== Without lifting a finger! ==========
21+
========== ==========
22+
==================================================
23+
selections:
24+
- anchor: {line: 2, character: 14}
25+
active: {line: 2, character: 21}
26+
- anchor: {line: 6, character: 15}
27+
active: {line: 6, character: 17}
28+
marks:
29+
default.l:
30+
start: {line: 4, character: 13}
31+
end: {line: 4, character: 16}
32+
finalState:
33+
documentContents: |-
34+
==================================================
35+
========== ==========
36+
========== Welcome to Cursorless! ==========
37+
========== ==========
38+
========== ==========
39+
========== So we can navigate ==========
40+
========== ==========
41+
========== Without lifting a finger! ==========
42+
========== ==========
43+
==================================================
44+
selections:
45+
- anchor: {line: 2, character: 14}
46+
active: {line: 2, character: 21}
47+
- anchor: {line: 5, character: 15}
48+
active: {line: 5, character: 17}
49+
thatMark:
50+
- anchor: {line: 4, character: 0}
51+
active: {line: 4, character: 0}
52+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: l}, selectionType: line, position: contents, insideOutsideType: outside, modifier: {type: identity}}]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
languageId: plaintext
2+
command:
3+
version: 1
4+
spokenForm: clear trap
5+
action: clearAndSetSelection
6+
targets:
7+
- type: primitive
8+
mark: {type: decoratedSymbol, symbolColor: default, character: t}
9+
initialState:
10+
documentContents: |-
11+
==================================================
12+
========== ==========
13+
========== Welcome to Cursorless! ==========
14+
========== ==========
15+
========== ==========
16+
========== So we can navigate ==========
17+
========== ==========
18+
========== Without lifting a finger! ==========
19+
========== ==========
20+
==================================================
21+
selections:
22+
- anchor: {line: 7, character: 27}
23+
active: {line: 7, character: 27}
24+
marks:
25+
default.t:
26+
start: {line: 2, character: 22}
27+
end: {line: 2, character: 24}
28+
finalState:
29+
documentContents: |-
30+
==================================================
31+
========== ==========
32+
========== Welcome Cursorless! ==========
33+
========== ==========
34+
========== ==========
35+
========== So we can navigate ==========
36+
========== ==========
37+
========== Without lifting a finger! ==========
38+
========== ==========
39+
==================================================
40+
selections:
41+
- anchor: {line: 2, character: 22}
42+
active: {line: 2, character: 22}
43+
thatMark:
44+
- anchor: {line: 2, character: 22}
45+
active: {line: 2, character: 22}
46+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: t}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
languageId: plaintext
2+
command:
3+
version: 1
4+
spokenForm: clear whale word you
5+
action: clearAndSetSelection
6+
targets:
7+
- type: primitive
8+
mark: {type: decoratedSymbol, symbolColor: default, character: w}
9+
initialState:
10+
documentContents: |-
11+
==================================================
12+
========== ==========
13+
========== Welcome Cursorless! ==========
14+
========== ==========
15+
========== ==========
16+
========== So we can navigate ==========
17+
========== ==========
18+
========== Without lifting a finger! ==========
19+
========== ==========
20+
==================================================
21+
selections:
22+
- anchor: {line: 2, character: 22}
23+
active: {line: 2, character: 22}
24+
marks:
25+
default.w:
26+
start: {line: 5, character: 15}
27+
end: {line: 5, character: 17}
28+
finalState:
29+
documentContents: |-
30+
==================================================
31+
========== ==========
32+
========== Welcome Cursorless! ==========
33+
========== ==========
34+
========== ==========
35+
========== So can navigate ==========
36+
========== ==========
37+
========== Without lifting a finger! ==========
38+
========== ==========
39+
==================================================
40+
selections:
41+
- anchor: {line: 5, character: 15}
42+
active: {line: 5, character: 15}
43+
thatMark:
44+
- anchor: {line: 5, character: 15}
45+
active: {line: 5, character: 15}
46+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: w}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}]
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
languageId: plaintext
2+
command:
3+
version: 1
4+
spokenForm: post look
5+
action: setSelectionAfter
6+
targets:
7+
- type: primitive
8+
mark: {type: decoratedSymbol, symbolColor: default, character: l}
9+
initialState:
10+
documentContents: |-
11+
==================================================
12+
========== ==========
13+
========== Welcome to Cursorless! ==========
14+
========== ==========
15+
========== ==========
16+
========== So we can navigate ==========
17+
========== ==========
18+
========== Without lifting a finger! ==========
19+
========== ==========
20+
==================================================
21+
selections:
22+
- anchor: {line: 7, character: 12}
23+
active: {line: 7, character: 12}
24+
marks:
25+
default.l:
26+
start: {line: 7, character: 20}
27+
end: {line: 7, character: 27}
28+
finalState:
29+
documentContents: |-
30+
==================================================
31+
========== ==========
32+
========== Welcome to Cursorless! ==========
33+
========== ==========
34+
========== ==========
35+
========== So we can navigate ==========
36+
========== ==========
37+
========== Without lifting a finger! ==========
38+
========== ==========
39+
==================================================
40+
selections:
41+
- anchor: {line: 7, character: 27}
42+
active: {line: 7, character: 27}
43+
thatMark:
44+
- anchor: {line: 7, character: 20}
45+
active: {line: 7, character: 27}
46+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: l}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}]
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
languageId: plaintext
2+
command:
3+
version: 1
4+
spokenForm: pre ink
5+
action: setSelectionBefore
6+
targets:
7+
- type: primitive
8+
mark: {type: decoratedSymbol, symbolColor: default, character: i}
9+
initialState:
10+
documentContents: |-
11+
==================================================
12+
========== ==========
13+
========== Welcome to Cursorless! ==========
14+
========== ==========
15+
========== ==========
16+
========== So we can navigate ==========
17+
========== ==========
18+
========== Without lifting a finger! ==========
19+
========== ==========
20+
==================================================
21+
selections:
22+
- anchor: {line: 2, character: 0}
23+
active: {line: 2, character: 50}
24+
- anchor: {line: 5, character: 0}
25+
active: {line: 5, character: 41}
26+
marks:
27+
default.i:
28+
start: {line: 7, character: 12}
29+
end: {line: 7, character: 19}
30+
finalState:
31+
documentContents: |-
32+
==================================================
33+
========== ==========
34+
========== Welcome to Cursorless! ==========
35+
========== ==========
36+
========== ==========
37+
========== So we can navigate ==========
38+
========== ==========
39+
========== Without lifting a finger! ==========
40+
========== ==========
41+
==================================================
42+
selections:
43+
- anchor: {line: 7, character: 12}
44+
active: {line: 7, character: 12}
45+
thatMark:
46+
- anchor: {line: 7, character: 12}
47+
active: {line: 7, character: 19}
48+
fullTargets: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: i}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}]
Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
[
2-
"Every cursorless command consists of an action performed on a target. For example, the command {takeWhale.yml} selects the token with a grey hat over the 'w'.",
3-
"When a hat is not gray, we need to use a color to refer to it: {takeBlueSun.yml}",
4-
"Selecting a single token is great but oftentimes we need something bigger. Say {takeEachPastKick.yml} to select a range.",
5-
"Despite its name, one of the most powerful aspects of cursorless is the ability to use more than one cursor. Let's try that: {takeWhaleAndVest.yml}",
6-
"But let's show that cursorless can live up to its name: we can say {chuckDrum.yml} to delete a word without ever moving our cursor."
2+
"Every cursorless command consists of an action performed on a target. For example, the command {step:takeWhale.yml} selects the token with a grey hat over the 'w'.",
3+
"When a hat is not gray, we need to use a color to refer to it: {step:takeBlueSun.yml}",
4+
"Selecting a single token is great but oftentimes we need something bigger. Say {step:takeEachPastKick.yml} to select a range.",
5+
"Despite its name, one of the most powerful aspects of cursorless is the ability to use more than one cursor. Let's try that: {step:takeCapAndWhale.yml}",
6+
"But let's show that cursorless can live up to its name: we can say {step:chuckDrum.yml} to delete a word without ever moving our cursor.",
7+
"Tokens are great, but they're just one way to think of a document. Let's try working with lines: {step:chuckLineLook.yml}",
8+
"We can also use {scopeType:line} to refer to the line containing our cursor: {step:takeLine.yml}",
9+
"You now know how to select and delete; let's give you a couple more actions to play with: say {action:setSelectionBefore} to place the cursor before a target, as in {step:preInk.yml}",
10+
"Say {action:setSelectionAfter} to place the cursor after a target: {step:postLook.yml}",
11+
"Say {action:clearAndSetSelection} to delete a word and move your cursor to where it used to be: {step:clearTrap.yml}",
12+
"Chaining commands is a great way to code faster: {step:clearWhaleWordYou.yml+wordYou}",
13+
"And that wraps up unit 1 of the cursorless tutorial. Next time, we'll write some code ☺️."
714
]
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
languageId: plaintext
2+
command:
3+
version: 1
4+
spokenForm: take cap and whale
5+
action: setSelection
6+
targets:
7+
- type: list
8+
elements:
9+
- type: primitive
10+
mark: {type: decoratedSymbol, symbolColor: default, character: c}
11+
- type: primitive
12+
mark: {type: decoratedSymbol, symbolColor: default, character: w}
13+
initialState:
14+
documentContents: |-
15+
==================================================
16+
========== ==========
17+
========== Welcome to Cursorless! ==========
18+
========== ==========
19+
========== Let's start using marks ==========
20+
========== ==========
21+
========== So we can navigate around ==========
22+
========== ==========
23+
========== Without lifting a finger! ==========
24+
========== ==========
25+
==================================================
26+
selections:
27+
- anchor: {line: 4, character: 13}
28+
active: {line: 4, character: 36}
29+
marks:
30+
default.c:
31+
start: {line: 2, character: 14}
32+
end: {line: 2, character: 21}
33+
default.w:
34+
start: {line: 6, character: 15}
35+
end: {line: 6, character: 17}
36+
finalState:
37+
documentContents: |-
38+
==================================================
39+
========== ==========
40+
========== Welcome to Cursorless! ==========
41+
========== ==========
42+
========== Let's start using marks ==========
43+
========== ==========
44+
========== So we can navigate around ==========
45+
========== ==========
46+
========== Without lifting a finger! ==========
47+
========== ==========
48+
==================================================
49+
selections:
50+
- anchor: {line: 2, character: 14}
51+
active: {line: 2, character: 21}
52+
- anchor: {line: 6, character: 15}
53+
active: {line: 6, character: 17}
54+
thatMark:
55+
- anchor: {line: 2, character: 14}
56+
active: {line: 2, character: 21}
57+
- anchor: {line: 6, character: 15}
58+
active: {line: 6, character: 17}
59+
fullTargets: [{type: list, elements: [{type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: c}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}, {type: primitive, mark: {type: decoratedSymbol, symbolColor: default, character: w}, selectionType: token, position: contents, insideOutsideType: inside, modifier: {type: identity}}]}]

0 commit comments

Comments
 (0)