Closed simonmandlik closed 1 month ago
Thanks for the issue!
This is an intended behavior of first searching only inside current line/selection before searching in the whole neighborhood. See this comment for a suggested workaround.
Closing as duplicate of #790, #392, #123, #116.
@echasnovski
First off, apologies for failing the search for duplicates 🫣
Would you perhaps be willing to revisit https://github.com/echasnovski/mini.nvim/issues/790#issuecomment-2083117530? I try to keep the neovim behavior as close as possible to nvim --clean
, only enhancing it, not modifying. In vanilla neovim, all examples I showed above end up with []
. And I really like this modus operandi — perform action at the cursor location and if not possible, move forward. This is true for not only text objects, but also e.g. for <C-a/x>, and many surround plugins.
I know there are n
and l
modifiers and in my opinion it is perfectly valid and concise configuration as well, it is just not consistent with the original neovim behavior. In the ideal world, I would like mini.ai
to behave as original neovim, provide some additional text objects, and also provided n
and l
in cases I really need it.
I really like everything else mini.ai
brings to the table, but not being able to emulate original neovim behavior in this case is a big con for me.
Would you perhaps be willing to revisit #790 (comment)?
Sorry, but nothing has changed in 3 weeks and this is still the suggested approach. To the extent that if I'd to implement 'mini.ai' now from scratch, it will probably be the default without all 'cover_or_xxx' search method.
Yes, I've seen the suggested approach. But search_mode = "cover"
means:
nvim-surround
.mini.ai
is an amazing plugin and thanks a lot for it, it's just a pity that migrating to it involves having to rewire your muscle memory.
Contributing guidelines
Module(s)
mini.ai
Description
I'm using default settings, search method is thus
cover_or_next
.Placing the cursor anywhere in
<cursor>
,di]
correctly deletes everything inside outer square brackets.However, in
di]
deletes only thec
.In
I get the correct behavior again.
Neovim version
0.10.0
Steps to reproduce
repro.lua
: