Skip to content

Add support to repeat commands #378

@AndreasArvidsson

Description

@AndreasArvidsson

Tokens and selection are treated on a text level
take air three times => Selects the token air and the next two instances of the same text
clear this twice => Clears the current selection and the next instance of the same text
take first word twice => Selects the first sub word and the next instance of the same text
take air past bat twice => Selects the range and the next instance of the same text

More complex scope and selection types are treated by order
take line air twice => Selects the line containing air and the next line below
take funk twice => Selects the current function and the next one below

To make this implementation feasible we probably need the new object oriented targets.

In the meantime there is an "ad hoc" solution to try:
https://github.com/AndreasArvidsson/andreas-talon/blob/master/apps/vscode/vscode_take_word.talon

Ponderings:

  • Should we have a grammar to go in the opposite direction? take air last three times
  • Should be try to align repeater commands with the user via a capture function or a csv file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions