Skip to content
Discussion options

You must be logged in to vote

It seems to work as expected and is mostly the matter of choosing the correct distance approach when computing which span is the closest.

It was a long time ago, but I remember trying to find the most intuitive behavior and the current one was the one. The basic idea is to find the region for a textobject match that is "closest in that direction". This means that:

  • For "next" it chooses a region with its closest left/start position that is after the cursor. This is true for all six gj cases, even the ones nested in other regions.
  • For "prev" it chooses a region with its closest right/end position that is before the cursor. This is true for all gk cases, since every one moves cursor to the …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@drowning-cat
Comment options

Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.ai as-expected The behavior is expected
2 participants