Closed Fau818 closed 1 year ago
As of right now, the implementation for normal_cur_line
is dependent on the implementation for normal_line
; I'll see if I can separate the two in a later update. I don't quite understand what you mean by "keep" highlight area for visual mode here. nvim-surround
does not generate any highlights on its own for visual surrounds, as it just uses the default highlight for when you are visually selecting some block of text.
Here is a video to show that.
When I use nvim-surround
to surround a text in normal mode, it could highlight the area until I type the surrounding char. Until now everything is fine.
But when I surround a text in visual mode, it removes the original highlight area. I like it could keep the original highlight area selected by me.
Sorry for the late response, but that is quite puzzling. It works on my end and I can't think of a reason that it would be clearing the highlights there; it should just use the visual selection that you provided. Are you using a tagged version of the plugin? If so, I would say to try out the "nightly" version on main
and see if that fixes things.
Hi @Fau818 can you try updating to the latest untagged version? Feel free to re-open this if it doesn't work.
Thank you very much! It's working great!
Checklist
main
branch?:h nvim-surround
to see if there might be any relevant information there?To reproduce
If I use the above setting, an error will occur when I type
S
in normal mode. I guess ifnormal_line
was be disabled, thenormal_cur_line
couldn't work well.By the way, because of the highlight feature, this plugin performed very nice for me, but it couldn't keep the highlight selection area if I try to surround a word in visual mode. Could it keep highlight area in visual mode?
Expected behavior
No response
Actual behavior
No response
Additional context
No response