Add add_cursor_to_word command
#14765
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves: #14703
This command works like
goto_word, except instead of moving the primary cursor to that word, a new cursor is added to the end of that word.This is a draft because while I like the idea of arbitrarily placing cursors with the keyboard (similar to alt-click with the mouse), I'm not sure this is the best UX for doing so. For example, you can have your cursor in the middle of one word, use
add_cursor_to_word, and have a new cursor at the end of another word, which doesn't make much sense.I'm beginning to wonder if some kind of "stamp cursor" mode should exist where you move a cursor around with standard movements, and place cursors where you want before they all become usable.
Edit: Seems like marks might have been proposed partially for this purpose? #703 (comment)