-
Notifications
You must be signed in to change notification settings - Fork 222
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mini.ai/surround can't match pair crossing lines when another pair in the same line #116
Comments
This depends on If you set |
I also do love |
Yeah, you are right that 'targets.vim' selects whole At the moment I am almost certain that this behavior won't change in the near future. Mainly for two reasons:
|
According to the help of targets.vim:
I guess that is how targets.vim select First, find three targets:
So It may not so many code change as you thought, we could search the cover and next textobject in the n_lines region directly (instead of searching current line first), and then consider which one should be choice depend on they are in the current line or not. |
Yep, seems like it.
This part is tricky because best match is searched in "1d neighborhood" (before and after lines concatenated with Anyway, I'll keep this suggestion in mind and see if something can be done here. |
It is caused by target.vim. See kylechui/nvim-surround#153 and echasnovski/mini.nvim#116 (comment). It looks like targets.vim is no longer maintained, so switch to mini.ai.
Contributing guidelines
Module(s)
mini.ai/surround
Description
Having
mini.ai/surround can't match parentheses of
f()
because the searching algorithm search in the current line first.Neovim version
0.7.2
Steps to reproduce
nvim -nu minimal.lua
(
, typeva(
orsh(
.Expected behavior
Select the parentheses of
f()
.Actual behavior
Parentheses of
g()
are selected.The text was updated successfully, but these errors were encountered: