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 49
49
]
50
50
51
51
callback_actions : dict [str , Callable [[CursorlessTarget ], None ]] = {
52
- "findInDocument" : actions .user .private_cursorless_find ,
53
52
"nextHomophone" : cursorless_homophones_action ,
54
53
}
55
54
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
5
2
6
3
ctx = Context ()
7
4
14
11
15
12
@ctx .action_class ("user" )
16
13
class 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
-
28
14
def private_cursorless_show_settings_in_ide ():
29
15
"""Show Cursorless-specific settings in ide"""
30
16
actions .user .private_cursorless_run_rpc_command_no_wait (
Original file line number Diff line number Diff line change 36
36
"reference" : " showReferences" ,
37
37
"rename" : " rename" ,
38
38
"reverse" : " reverseTargets" ,
39
+ "scout" : " findInDocument" ,
39
40
"scout all" : " findInWorkspace" ,
40
41
"shuffle" : " randomizeTargets" ,
41
42
"snippet make" : " generateSnippet" ,
45
46
"unfold" : " unfoldRegion"
46
47
},
47
48
"callback_action" : {
48
- "scout" : " findInDocument" ,
49
49
"phones" : " nextHomophone"
50
50
},
51
51
"paste_action" : { "paste" : " pasteFromClipboard" },
You can’t perform that action at this time.
0 commit comments