Add a way to use tree sitter textobjects to move to the "next (undefined) object"? #9251
Unanswered
jerabaul29
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
During code exploration, I often end up using tree sitter textobjects to move around. Typically, I want to get to the start of a function, read about it, then I may not be interested in reading the full body, so I want to move to the next object and read about it, etc.
At present, I can use the tree sitter textobjects to move around as described in https://docs.helix-editor.com/usage.html#navigating-using-tree-sitter-textobjects , for example
]f
to move to the next function,t
to the next type, etc. The challenge is that, I usually do not know in advance what the next "undefined" object will be. I.e., after the end of the function I am looking into, will there be a function, or a type, or a test, etc.Hence my question: would it be reasonable to add a tree sitter motion, let us say
]n
(for "next") that works in the following ways in pseudo code:This way, it would be possible to navigate the code forward to the next "meaningful" object, without knowing in advance its type.
Beta Was this translation helpful? Give feedback.
All reactions