tpope / vim-surround

surround.vim: Delete/change/add parentheses/quotes/XML-tags/much more with ease
https://www.vim.org/scripts/script.php?script_id=1697
13.39k stars 444 forks source link

[Feature Request] Support wide characters such as `『』` #361

Closed KSR-Yasuda closed 2 years ago

KSR-Yasuda commented 2 years ago

Could you support wide characters such as 『』 (U+300E, U+300F)?

In Unicode, the categories below are paired:

pilgrimlyieu commented 2 years ago

Firstly, use https://github.com/tomtomjhj/vim-surround which is equipped with #355 instead.

Then add the following code to your vimrc file.

let g:surround_{char2nr('q')} = "『\r』"

Finally you can use q as a stand for 『...』.

KSR-Yasuda commented 2 years ago

Okay, I'll try it. Thank you.