File tree Expand file tree Collapse file tree 4 files changed +2
-28
lines changed Expand file tree Collapse file tree 4 files changed +2
-28
lines changed Original file line number Diff line number Diff line change 4949]
5050
5151callback_actions : dict [str , Callable [[CursorlessTarget ], None ]] = {
52- "findInDocument" : actions .user .private_cursorless_find ,
5352 "nextHomophone" : cursorless_homophones_action ,
5453}
5554
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- from talon import Context , actions , app
2-
3- from ..actions .get_text import cursorless_get_text_action
4- from ..targets .target_types import CursorlessTarget
1+ from talon import Context , actions
52
63ctx = Context ()
74
1411
1512@ctx .action_class ("user" )
1613class Actions :
17- def private_cursorless_find (target : CursorlessTarget ):
18- """Find text of target in editor"""
19- texts = cursorless_get_text_action (target , ensure_single_target = True )
20- search_text = texts [0 ]
21- if len (search_text ) > 200 :
22- search_text = search_text [:200 ]
23- app .notify ("Search text is longer than 200 characters; truncating" )
24- actions .user .private_cursorless_run_rpc_command_no_wait ("actions.find" )
25- actions .sleep ("50ms" )
26- actions .insert (search_text )
27-
2814 def private_cursorless_show_settings_in_ide ():
2915 """Show Cursorless-specific settings in ide"""
3016 actions .user .private_cursorless_run_rpc_command_no_wait (
Original file line number Diff line number Diff line change 3636 "reference" : " showReferences" ,
3737 "rename" : " rename" ,
3838 "reverse" : " reverseTargets" ,
39+ "scout" : " findInDocument" ,
3940 "scout all" : " findInWorkspace" ,
4041 "shuffle" : " randomizeTargets" ,
4142 "snippet make" : " generateSnippet" ,
4546 "unfold" : " unfoldRegion"
4647 },
4748 "callback_action" : {
48- "scout" : " findInDocument" ,
4949 "phones" : " nextHomophone"
5050 },
5151 "paste_action" : { "paste" : " pasteFromClipboard" },
You can’t perform that action at this time.
0 commit comments