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
This is a very rough, nascent idea. I just wanted to record it to get it out of my head and to let it marinate.
Core idea
Add stable, rendered ranges to documents, perhaps visualized using underlines. (I will use bold here, because markdown doesn't support underlines.)
These are using an explicit creation action, like "mark air past bat".
They might also be created passively during use, by marking a range for "that" and "source" every time one of them is a Sufficiently Complicated range (probably: something with more than a single scope + mark).
They are destroyed actively with a command like "unmark func".
To make this work with an in-memory-only LSP-style design, they are also destroyed if the document is closed. To avoid them becoming overwhelming, we might also want to passively destroy them in an LRU fashion (or something similar).
To use a range, we provide a new scope called "range", used to refer to the range containing a hat.
So given this content:
hello big beautiful world
The command "mark two tokens gust" would generate a range:
hello big beautiful world
And then "take range fine" would select "big beautiful".
Why
This could potentially help with a few things:
I find "that" and particularly "source" difficult to use reliably, because they are invisible (although as invisible state goes, they're pretty harmless). It is easy to lose track of or mistarget them. They are also fragile/transient. If they were rendered in the document as ranges, they would be as easy to use as other hats and other scopes.
When doing work involving many things, I often end up re-referring to a complicated target.
Stable snippet holes could be given ranges, and then any stability work done for ranges applies to them for free. However, given that the way to address ranges requires that there be tokens in them, this requires that holes have some content (presumably inline comments).
Bookmarks. That is an exciting idea, but naming and persisting the content is harder than having ad hoc, anonymous ranges.
In the ideal world, we would all use fancy commands and chaining to achieve complex goals. But for beginners (and tired advanced users), it would be useful to be able to externalize intermediate state as you work towards a goal. Currently the primary tool that cursorless users have for this is selections, but those are fragile.
We would have to define how ranges are updated in response to edits. Edits that are purely before, after, or inside a range seem straightforward. Edits that overlap a range boundary may simply result in the destruction of the range.
This would add significant long-lived state outside of the document. Currently the external state is limited to very transient things (like "that" and "src").
This is would add even more visual noise to a document.
If ranges are allowed to overlap, we'd have to figure out how to render multiple ranges in the same space (different styles of underlining? different colors?).
Do you refer to ranges using tokens or hats? Given the content "abc def", if you "mark tail third char air", you get "abc def". If you then "take range air", does it select that range? The token "abc" overlaps the range, but the glyph with the hat is outside the range.
Users might expect "smart ranges", i.e. ranges that correspond to the spoken form used to select them and which auto-update as the document changes, rather than ranges that correspond to (auto-updated) character offsets.
Users might expect a way to modify existing ranges.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Status
This is a very rough, nascent idea. I just wanted to record it to get it out of my head and to let it marinate.
Core idea
Add stable, rendered ranges to documents, perhaps visualized using underlines. (I will use bold here, because markdown doesn't support underlines.)
These are using an explicit creation action, like
"mark air past bat"
.They might also be created passively during use, by marking a range for "that" and "source" every time one of them is a Sufficiently Complicated range (probably: something with more than a single scope + mark).
They are destroyed actively with a command like
"unmark func"
.To make this work with an in-memory-only LSP-style design, they are also destroyed if the document is closed. To avoid them becoming overwhelming, we might also want to passively destroy them in an LRU fashion (or something similar).
To use a range, we provide a new scope called "range", used to refer to the range containing a hat.
So given this content:
The command
"mark two tokens gust"
would generate a range:And then
"take range fine"
would select "big beautiful".Why
This could potentially help with a few things:
I find "that" and particularly "source" difficult to use reliably, because they are invisible (although as invisible state goes, they're pretty harmless). It is easy to lose track of or mistarget them. They are also fragile/transient. If they were rendered in the document as ranges, they would be as easy to use as other hats and other scopes.
When doing work involving many things, I often end up re-referring to a complicated target.
Stable snippet holes could be given ranges, and then any stability work done for ranges applies to them for free. However, given that the way to address ranges requires that there be tokens in them, this requires that holes have some content (presumably inline comments).
Bookmarks. That is an exciting idea, but naming and persisting the content is harder than having ad hoc, anonymous ranges.
In the ideal world, we would all use fancy commands and chaining to achieve complex goals. But for beginners (and tired advanced users), it would be useful to be able to externalize intermediate state as you work towards a goal. Currently the primary tool that cursorless users have for this is selections, but those are fragile.
Challenges and open questions
Lots of these!
These would be non-hierarchical scopes.
We would have to define how ranges are updated in response to edits. Edits that are purely before, after, or inside a range seem straightforward. Edits that overlap a range boundary may simply result in the destruction of the range.
This would add significant long-lived state outside of the document. Currently the external state is limited to very transient things (like "that" and "src").
This is would add even more visual noise to a document.
If ranges are allowed to overlap, we'd have to figure out how to render multiple ranges in the same space (different styles of underlining? different colors?).
Do you refer to ranges using tokens or hats? Given the content "abc def", if you
"mark tail third char air"
, you get "abc def". If you then"take range air"
, does it select that range? The token "abc" overlaps the range, but the glyph with the hat is outside the range.Users might expect "smart ranges", i.e. ranges that correspond to the spoken form used to select them and which auto-update as the document changes, rather than ranges that correspond to (auto-updated) character offsets.
Users might expect a way to modify existing ranges.
Beta Was this translation helpful? Give feedback.
All reactions