[mini.ai] New search_method 'cover_or_next_or_prev' #1979
Replies: 1 comment
-
Thanks for the suggestion! The main reason At the moment I do regret having So I am afraid introducing even more complex search method goes against this whole line of reasoning. Still, thank you for taking time to write this! |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The default search method is
cover_or_next
.vib
selects the surrounding block, or the next block if there is no surrounding block.A reasonable fallback when forward search fails is a backward search. Uncontroversial special cases may be
and I speculate this additional fallback would be preferred by some users in the general case.
The
cover_or_next
method presumably exists for similar reasoning: If the user knows the preferred method will fail, they can cover move cases with fewer commands by deliberately entering a fallback. Stock Nvim has a similar effect for the"
objects where the next quote is chosen implicitly.Some users may prefer the current behavior because it allows deducing the existence of the searched text object in the specified direction. This is especially plausible when:
vinb
rather thanvib
), orn
orl
explicitly should remain as is).Proposed behavior:
n
/l
not specified (method does not exist yet)n
/l
invoked, do not fallback to the other directionBeta Was this translation helpful? Give feedback.
All reactions