Split goto-number functionality from increment/decrement into a textobject #3028
Labels
A-helix-term
Area: Helix term improvements
C-discussion
Category: Discussion or questions that doesn't represent real issues
Increment (
C-a
) and decrement (C-d
) currently move forward to the next number on their line if the cursor is not already over a number.It would fit better with the select-then-act paradigm to split the motion and action behaviors.
C-a
andC-d
can continue to increment and decrement but should not move the cursor. Increment/decrement should only act on the current selections. A new textobject]n
/[n
/min
/man
could replace the motion.The new textobject could use tree-sitter queries to find number specific to the current language and/or could use a default naive implementation like what we have in increment/decrement now. (Falling back to a naive implementation would only work if we can easily detect that a query does not have any
number.inside
/number.around
captures. I think that should be possible to figure out without running the query.)The text was updated successfully, but these errors were encountered: