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
Today, it is difficult / impossible to issue a single command phrase in which a "bring" / "move" command is followed by a command that modifies the newly copied / moved target, because the new text won't contain any hats until after the phrase has ended. We'd like to remove this limitation, enabling more fluent coding with longer command chains
Here's an example:
functionfoo(){|}constbar=baz("bongo")
In the above, our cursor is in the function foo, and we'd like to move the statement declaring bar to our cursor location, fluently changing the function call argument to be hello. Here's the desired end state:
functionfoo(){constbar=baz(hello)}
Possible solutions
These solutions are not mutually exclusive; it is better to have multiple ways to accomplish this task so that the user / situation can determine the best approach. For each approach, we indicate at the end the exact command phrase that the user could issue to accomplish the above example.
Option 1: Hat migration [yes]
Automatically move the hats from the source to the target immediately after a "bring" / "move". This approach would result in a single hat corresponding to multiple locations in the case of a single-source-multiple-destination broadcast move (eg "bring funk air to after bat and cap")
We could create an alternate term for the source hats as well, eg "source gust", etc
Alternately we could leave the old hats and have the new ones be called "that gust" or "new gust"
Example: "move state zip clear arg gust word hello"
Add an optional clause at the end of "bring" / "move" called "taking" which moves the selection to the corresponding piece of the new target. So if you say "bring funk air taking arg bat", it would create a copy of the function, selecting the argument in the new target corresponding to the argument "bat" in the source
Example: "move state zip taking arg gust word hello"
Option 3: Selection migration [yes]
Make it so that if the user has selection(s) within the source, the selections will be moved to the corresponding place in the new target, similar to how we do for "clone"
The problem
Today, it is difficult / impossible to issue a single command phrase in which a "bring" / "move" command is followed by a command that modifies the newly copied / moved target, because the new text won't contain any hats until after the phrase has ended. We'd like to remove this limitation, enabling more fluent coding with longer command chains
Here's an example:
In the above, our cursor is in the function
foo
, and we'd like to move the statement declaringbar
to our cursor location, fluently changing the function call argument to behello
. Here's the desired end state:Possible solutions
These solutions are not mutually exclusive; it is better to have multiple ways to accomplish this task so that the user / situation can determine the best approach. For each approach, we indicate at the end the exact command phrase that the user could issue to accomplish the above example.
Option 1: Hat migration [yes]
Example:
"move state zip clear arg gust word hello"
Note: This behaviour already occurs with "clone"
Tracker issue:
Option 2:
"taking"
[no]Example:
"move state zip taking arg gust word hello"
Option 3: Selection migration [yes]
Example:
"take arg gust move state back word hello"
Tracker issue:
Option 4: Relative scopes [yes]
Example:
"move state zip clear next arg word hello"
Tracker issue:
The text was updated successfully, but these errors were encountered: