tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease

Home Page:https://www.vim.org/scripts/script.php?script_id=1697

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Specific custom surrounds can not be changed via `cs`

pilgrimlyieu opened this issue · comments

I've used char2nr("(") and char2nr(")") to check the code and add the following setting.

let g:surround_65288 = "\r"
let g:surround_65289 = "\r"

And I can use ys command to add the surroundings or use cs command to change builtin surroundings(like ( etc.) to my custom surroundings(like ).

However, I can not change my custom surroundings to other surroundings, which means I can not use cs(( to change contents like (aaa) to (aaa).

Furthermore, I've tried a test surrounding as following.

let g:surround_126 = "~\r~"

But this time I can use cs~" to change ~aaa~ to "aaa". So I think may be only some special characters(may be full-width characters) can not be changed.

By the way, I type using key maps Shift + 9 while ~ needs Shift as well so I think it may have nothing to do with key input.

Here's an related pr

Closed because I use my fork version pilgrimlyieu/vim-surround that applies #355 changes.