You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/user/README.md
+27Lines changed: 27 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,6 +351,33 @@ If your cursor is touching a token, you can say `"take every instance"` to selec
351
351
352
352
Pro tip: if you say eg `"take five instances air"`, and it turns out you need more, you can say eg `"take that and next two instances that"` to select the next two instances after the last instance you selected.
353
353
354
+
##### `"just"`
355
+
356
+
The `"just"` modifier strips the target of any semantic information, treating it as just a raw range, with the following effects:
357
+
358
+
- The new target has no leading or trailing delimiters. For example:
359
+
360
+
-`"chuck just air"` will delete just the air token, leaving adjacent spaces undisturbed, unlike the default behaviour of `"chuck air"` that deletes the air token _and_ cleans up adjacent whitespace as appropriate. Ie for
361
+
362
+
```
363
+
bbb aaa ccc
364
+
```
365
+
366
+
`"chuck just air"` would result in `bbb ccc` (note the double space in the middle), whereas `"chuck air"` would result in `bbb ccc`.
367
+
368
+
- `"chuck just line"` will delete only the content of the current line, without removing the line ending, resulting in a blank line, unlike the default behaviour of `"chuck line"` that removes the line entirely, leaving no blank line.
369
+
370
+
- A raw range does not have its own insertion delimitiers.
371
+
- For example, `"paste after just air"` will paste directly after the air token, without inserting a space, as opposed to the way `"paste after air"` would insert a space before the pasted content.
372
+
- If you use `"just"` on the destination of a `"bring"` command, it will inherit its insertion delimiters from the source of the `"bring"` action. For example, in the command `"bring arg air and bat after just paren"`, the `"air"` and `"bat"` arguments will be joined by commas. In contrast, `"bring arg air and bat after token paren"` would join the arguments with spaces.
373
+
- In the case of [`"instance"`](#instance), by default `"every instance air"` will only consider instances of the air token that are themselves full tokens, but `"every instance just air"` doesn't have such a restriction, because we've stripped air of its semantic "token-ness".
374
+
375
+
Some examples:
376
+
377
+
- `"chuck just air"`: deletes just the air token, leaving spaces undisturbed.
378
+
- `"chuck just line"`: deletes just the content of the line, leaving a blank line.
379
+
- `"bring bat after just air"`: results in something like `aaabbb` where the bat token was copied after the air token with no delimeter between them.
380
+
354
381
###### Experimental: `"from"`
355
382
356
383
We have experimental support for prefixing a command with `"from <target>"` to narrow the range within which `"every instance"` searches, or to set the start point from which `"next instance"` searches. For example:
0 commit comments