Replies: 1 comment
-
It does work with multibyte characters. The reason it doesn't work in provided example is the same: the specification uses Here is an example that works: require('mini.surround').setup({
custom_surroundings = {
b = {
input = {
-- Add extra nesting to achieve "match any of them" behavior
-- Otherwise the whole input will be considered as a nesting span
-- (i.e. each element defines a pattern to match after matching
-- previous pattern)
{
-- ASCII brackets are single byte - '^.().*().$' matches correctly
{ '%b()', '^.().*().$' },
{ '%b[]', '^.().*().$' },
{ '%b{}', '^.().*().$' },
-- These brackets are multibyte, so require separate patterns
'(().-())',
'【().-()】',
},
},
},
},
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Contributing guidelines
Module(s)
mini.surround
Question
i try to change my surround chinese brackets like
(some words)or【some words】, below is my config, it can know the brackets position, but can not change the right charactor, if i do delete surround command in(some words), this will change to be looks like<bc><88>some words<ef><bc>, it looks like mini.surround not work with unicode, can i do something to work with chinese brackets? there is a similar question in mini.ai #2027 , it can works well,but how can i do this in mini.surround?Beta Was this translation helpful? Give feedback.
All reactions