Skip to content

[surround]: Visual mode surround issues #1765

Closed Answered by echasnovski
rbhanot4739 asked this question in Q&A
Discussion options

You must be logged in to vote

... however with this in place when I visually select and do sa to add the surrounding, it does not work and simply wraps the line with ` character and then indents the selected line. ...

Yes, because there is an explicit send_keys("`>") which gets executed after pressing sa (as it internally leads to the mode change). As 'mini.surround' expects after sa a surrounding identifier, it treats ` (first key of send_keys()) as such identifier and surrounds selection with it.

I came up with the following autocmd(with some assistance from copilot 😀) to move to the line where I start the visual selection, ...

I don't really understand the use case here. With visual selection cursor can be eith…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by echasnovski
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested mini.surround
2 participants