How to add extra lines when surrounding #1758
-
Contributing guidelines
Module(s)mini.surround QuestionIn nvim.surround, there is the option to move the surrounding to a seperate line. E.g. when using
to
Is there a similar option in mini.surround? I didn't find anything in the docs |
Beta Was this translation helpful? Give feedback.
Answered by
echasnovski
Apr 24, 2025
Replies: 1 comment 8 replies
-
Yes, this is possible in 'mini.surround' to a certain extent via This particular case would work via |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Unfortunately, there is no easy way to do this, as usually mixing charwise and linewise operations (as this makes charwise selection appear on separate lines with new indent) is up to no good.
The best feasible solution is to follow @krovuxdev's suggestion and dedicate a special identifier for such cases. However, using only
{\n
and\n}
is not enough as it will not keep indent, which is the real problem here. So this would require something like this: