-
Notifications
You must be signed in to change notification settings - Fork 797
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Creates the "find" tag and removes that functionality from "find_and_…
…replace" (#1404) The idea is to have a separate "find" tag for very basic search functionality. The reason is that there are many types of applications that are mostly view only (webbrowsers, pdf readers, etc.). These applications would not benefit from the full functionality of the "find_and_replace" tag. In order not to define some voice commands twice, I made the "find_and_replace" tag automatically activate the new "find" tag as well and removed what would have been duplicate definitions. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nicholas Riley <[email protected]>
1 parent
18c0aa4
commit 5ebcea7
Showing
9 changed files
with
50 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
from talon import Module | ||
|
||
mod = Module() | ||
mod.tag("find", desc="Tag for enabling generic find commands") | ||
|
||
|
||
@mod.action_class | ||
class Actions: | ||
def find(text: str): | ||
"""Finds text in current editor""" | ||
|
||
def find_next(): | ||
"""Navigates to the next occurrence""" | ||
|
||
def find_previous(): | ||
"""Navigates to the previous occurrence""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
tag: user.find | ||
- | ||
hunt this: user.find("") | ||
hunt this (pace | paste): | ||
user.find("") | ||
sleep(25ms) | ||
edit.paste() | ||
hunt this <user.text>: user.find(text) | ||
hunt next: user.find_next() | ||
hunt previous: user.find_previous() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters