You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A kind of interactive text object maker, usable as a text object.
Problem
With code:
while (line:=text_lines[0]):
# cursor here ~~^
I want to select text_lines[0], the assignment value of the variable.
Possible resolution:
A dedicated text object for the current expression, but that would probably just select text_lines,
(edit: or maybe not?)
A dedicated text object for the value of assignment, but that would eat a key for a very specific use case, hard to find test object keys for all use cases..
(edit: unless it's moved behind a treesitter-node-specific operator? tv instead of just v 🤔)
Select the text the-old-way: bvt) (no semantics), BAD because not be reliable in a macro if value is a function call..
(e.g on while (line := foo(bar)))
Trigger a custom text object, that checks nodes under cursor and suggest queries to choose from (could be edited on the fly? with preview) to select the wanted text.
The used text-object could then be saved and repeated in some cases (which ones?)
The text was updated successfully, but these errors were encountered:
CRAZY IDEA:
A kind of interactive text object maker, usable as a text object.
Problem
With code:
I want to select
text_lines[0]
, the assignment value of the variable.Possible resolution:
text_lines
,(edit: or maybe not?)
(edit: unless it's moved behind a treesitter-node-specific operator?
tv
instead of justv
🤔)bvt)
(no semantics), BAD because not be reliable in a macro if value is a function call..(e.g on
while (line := foo(bar))
)Crazy solution
Trigger a custom text object, that checks nodes under cursor and suggest queries to choose from (could be edited on the fly? with preview) to select the wanted text.
The used text-object could then be saved and repeated in some cases (which ones?)
The text was updated successfully, but these errors were encountered: