Skip to content

Commit b20a436

Browse files
authored
Merge branch 'main' into pokey/fix-local-cheatsheet
2 parents 5895e4c + ba5f0a2 commit b20a436

File tree

247 files changed

+9644
-1856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

247 files changed

+9644
-1856
lines changed

.vscodeignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
!NOTICE.md
55
!README.md
66
!build-info.json
7-
!cursorless-snippets/**
87
!cursorless-nx/dist/apps/cheatsheet-local/index.html
8+
!cursorless-snippets/**
99
!dist/extension.js
10+
!fonts/cursorless-glyph.svg
11+
!fonts/cursorless.woff
1012
!images/hats/**
1113
!images/icon.png
1214
!package.json

cursorless-nx/libs/cheatsheet/src/lib/cheatsheetLegend.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ const cheatsheetLegend: CheatsheetLegend = [
1313
definition: 'Formatter (eg "camel", "snake"). Say "format help" for a list',
1414
id: 'formatter',
1515
},
16+
{
17+
term: 'M',
18+
definition: 'Cursorless modifier',
19+
link: 'https://www.cursorless.org/docs/#modifiers',
20+
id: 'modifier',
21+
},
1622
{
1723
term: 'P',
1824
definition: 'Paired delimiter',
@@ -30,6 +36,11 @@ const cheatsheetLegend: CheatsheetLegend = [
3036
link: 'https://www.cursorless.org/docs/#targets',
3137
id: 'target',
3238
},
39+
{
40+
term: 'number',
41+
definition: 'Number',
42+
id: 'number',
43+
},
3344
];
3445

3546
export default cheatsheetLegend;

cursorless-nx/libs/cheatsheet/src/lib/data/sampleSpokenFormInfos/defaults.json

Lines changed: 167 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,6 +894,90 @@
894894
}
895895
]
896896
},
897+
{
898+
"name": "Modifiers",
899+
"id": "modifiers",
900+
"items": [
901+
{
902+
"id": "excludeInterior",
903+
"type": "modifier",
904+
"variations": [
905+
{
906+
"spokenForm": "bounds",
907+
"description": "Bounding paired delimiters"
908+
}
909+
]
910+
},
911+
{
912+
"id": "toRawSelection",
913+
"type": "modifier",
914+
"variations": [
915+
{
916+
"spokenForm": "just",
917+
"description": "No inference"
918+
}
919+
]
920+
},
921+
{
922+
"id": "leading",
923+
"type": "modifier",
924+
"variations": [
925+
{
926+
"spokenForm": "leading",
927+
"description": "Leading delimiter range"
928+
}
929+
]
930+
},
931+
{
932+
"id": "trailing",
933+
"type": "modifier",
934+
"variations": [
935+
{
936+
"spokenForm": "trailing",
937+
"description": "Trailing delimiter range"
938+
}
939+
]
940+
},
941+
{
942+
"id": "interiorOnly",
943+
"type": "modifier",
944+
"variations": [
945+
{
946+
"spokenForm": "inside",
947+
"description": "Interior only"
948+
}
949+
]
950+
},
951+
{
952+
"id": "extendThroughStartOf",
953+
"type": "modifier",
954+
"variations": [
955+
{
956+
"spokenForm": "head",
957+
"description": "Extend through start of line"
958+
},
959+
{
960+
"spokenForm": "head <M>",
961+
"description": "Extend through start of <M>"
962+
}
963+
]
964+
},
965+
{
966+
"id": "extendThroughEndOf",
967+
"type": "modifier",
968+
"variations": [
969+
{
970+
"spokenForm": "tail",
971+
"description": "Extend through end of line"
972+
},
973+
{
974+
"spokenForm": "tail <M>",
975+
"description": "Extend through end of <M>"
976+
}
977+
]
978+
}
979+
]
980+
},
897981
{
898982
"name": "Paired delimiters",
899983
"id": "pairedDelimiters",
@@ -1073,6 +1157,46 @@
10731157
"description": "Nothing"
10741158
}
10751159
]
1160+
},
1161+
{
1162+
"id": "unknownSymbol",
1163+
"type": "mark",
1164+
"variations": [
1165+
{
1166+
"spokenForm": "special",
1167+
"description": "Unknown symbol"
1168+
}
1169+
]
1170+
},
1171+
{
1172+
"id": "lineNumberModulo100",
1173+
"type": "mark",
1174+
"variations": [
1175+
{
1176+
"spokenForm": "row <number>",
1177+
"description": "Line number modulo 100"
1178+
}
1179+
]
1180+
},
1181+
{
1182+
"id": "lineNumberRelativeUp",
1183+
"type": "mark",
1184+
"variations": [
1185+
{
1186+
"spokenForm": "up <number>",
1187+
"description": "Line number up from cursor"
1188+
}
1189+
]
1190+
},
1191+
{
1192+
"id": "lineNumberRelativeDown",
1193+
"type": "mark",
1194+
"variations": [
1195+
{
1196+
"spokenForm": "down <number>",
1197+
"description": "Line number down from cursor"
1198+
}
1199+
]
10761200
}
10771201
]
10781202
},
@@ -1136,9 +1260,23 @@
11361260
}
11371261
]
11381262
},
1263+
{
1264+
"id": "rangeExclusive",
1265+
"type": "compoundTargetConnective",
1266+
"variations": [
1267+
{
1268+
"spokenForm": "<T1> between <T2>",
1269+
"description": "between T1 and T2"
1270+
},
1271+
{
1272+
"spokenForm": "between <T>",
1273+
"description": "between S and T"
1274+
}
1275+
]
1276+
},
11391277
{
11401278
"id": "rangeInclusive",
1141-
"type": "action",
1279+
"type": "compoundTargetConnective",
11421280
"variations": [
11431281
{
11441282
"spokenForm": "<T1> past <T2>",
@@ -1149,6 +1287,34 @@
11491287
"description": "S through T"
11501288
}
11511289
]
1290+
},
1291+
{
1292+
"id": "rangeExcludingEnd",
1293+
"type": "compoundTargetConnective",
1294+
"variations": [
1295+
{
1296+
"spokenForm": "<T1> until <T2>",
1297+
"description": "T1 until start of T2"
1298+
},
1299+
{
1300+
"spokenForm": "until <T>",
1301+
"description": "S until start of T"
1302+
}
1303+
]
1304+
},
1305+
{
1306+
"id": "verticalRange",
1307+
"type": "compoundTargetConnective",
1308+
"variations": [
1309+
{
1310+
"spokenForm": "<T1> slice <T2>",
1311+
"description": "T1 vertically through T2"
1312+
},
1313+
{
1314+
"spokenForm": "slice <T>",
1315+
"description": "S vertically through T"
1316+
}
1317+
]
11521318
}
11531319
]
11541320
},

cursorless-talon/src/actions/actions.py

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
from ..csv_overrides import init_csv_and_watch_changes
44
from .actions_callback import callback_action_defaults, callback_action_map
55
from .actions_custom import custom_action_defaults
6-
from .actions_makeshift import makeshift_action_defaults, makeshift_action_map
76
from .actions_simple import (
87
no_wait_actions,
8+
no_wait_actions_post_sleep,
99
positional_action_defaults,
1010
simple_action_defaults,
1111
)
@@ -40,22 +40,10 @@ def cursorless_command(action_id: str, target: dict):
4040
"""Perform cursorless command on target"""
4141
if action_id in callback_action_map:
4242
return callback_action_map[action_id](target)
43-
elif action_id in makeshift_action_map:
44-
command, command_options, talon_options = makeshift_action_map[action_id]
45-
return_value = (
46-
vscode_command(command, target, command_options)
47-
if talon_options.await_command
48-
else vscode_command_no_wait(command, target, command_options)
49-
)
50-
51-
if talon_options.post_command_sleep_ms:
52-
actions.sleep(f"{talon_options.post_command_sleep_ms}ms")
53-
54-
return return_value
5543
elif action_id in no_wait_actions:
56-
return actions.user.cursorless_single_target_command_no_wait(
57-
action_id, target
58-
)
44+
actions.user.cursorless_single_target_command_no_wait(action_id, target)
45+
if action_id in no_wait_actions_post_sleep:
46+
actions.sleep(no_wait_actions_post_sleep[action_id])
5947
else:
6048
return actions.user.cursorless_single_target_command(action_id, target)
6149

@@ -89,7 +77,6 @@ def vscode_command_no_wait(command_id: str, target: dict, command_options: dict
8977
"simple_action": simple_action_defaults,
9078
"positional_action": positional_action_defaults,
9179
"callback_action": callback_action_defaults,
92-
"makeshift_action": makeshift_action_defaults,
9380
"custom_action": custom_action_defaults,
9481
"swap_action": {"swap": "swapTargets"},
9582
"move_bring_action": {"bring": "replaceWithTarget", "move": "moveToTarget"},

cursorless-talon/src/actions/actions_makeshift.py

Lines changed: 0 additions & 82 deletions
This file was deleted.

0 commit comments

Comments
 (0)