on master help sign in
docs: replace string.gsub with [=[...]=] string
commitb9cc0a26f3b5610ce772004e1efd452b10b36bc9 authoralohaia <liu.qihuan@outlook.com> dateWed 25 May 2022, 21:04 (4 years ago) parentaea9131
4 files changed+6−6
README.md+2−2 doc/nvim-autopairs.txt+2−2 lua/nvim-autopairs.lua+1−1 lua/nvim-autopairs/fastwrap.lua+1−1
README.md+2−2
@@ -15,7 +15,7 @@ require('nvim-autopairs').setup{}
1515local disable_filetype = { "TelescopePrompt" }
1616local disable_in_macro = false -- disable when recording or executing a macro
1717local disable_in_visualblock = false -- disable when insert after visual block mode
18−local ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]],"%s+", "")
18+local ignored_next_char = [=[[%w%%%'%[%"%.]]=]
1919local enable_moveright = true
2020local enable_afterquote = true -- add bracket pairs after quote
2121local enable_check_bracket_line = true --- check bracket in same line
@@ -301,7 +301,7 @@ npairs.setup({
301301 fast_wrap = {
302302 map = '<M-e>',
303303 chars = { '{', '[', '(', '"', "'" },
304− pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], '%s+', ''),
304+ pattern = [=[[%'%"%)%>%]%)%}%,]]=],
305305 end_key = '$',
306306 keys = 'qwertyuiopzxcvbnmasdfghjkl',
307307 check_comma = true,
doc/nvim-autopairs.txt+2−2
@@ -25,7 +25,7 @@ DEFAULT VALUES *nvim-autopairs-default-values*
2525 local disable_filetype = { "TelescopePrompt" }
2626 local disable_in_macro = false -- disable when recording or executing a macro
2727 local disable_in_visualblock = false -- disable when insert after visual block mode
28− local ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]],"%s+", "")
28+ local ignored_next_char = [=[[%w%%%'%[%"%.]]=]
2929 local enable_moveright = true
3030 local enable_afterquote = true -- add bracket pairs after quote
3131 local enable_check_bracket_line = true --- check bracket in same line
@@ -328,7 +328,7 @@ FASTWRAP ~
328328 fast_wrap = {
329329 map = '<M-e>',
330330 chars = { '{', '[', '(', '"', "'" },
331− pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], '%s+', ''),
331+ pattern = [=[[%'%"%)%>%]%)%}%,]]=],
332332 end_key = '$',
333333 keys = 'qwertyuiopzxcvbnmasdfghjkl',
334334 check_comma = true,
lua/nvim-autopairs.lua+1−1
@@ -19,7 +19,7 @@ local default = {
1919 disable_filetype = { 'TelescopePrompt', 'spectre_panel' },
2020 disable_in_macro = false,
2121 disable_in_visualblock = false,
22− ignored_next_char = string.gsub([[ [%w%%%'%[%"%.] ]], '%s+', ''),
22+ ignored_next_char = [=[[%w%%%'%[%"%.]]=],
2323 check_ts = false,
2424 enable_moveright = true,
2525 enable_afterquote = true,
lua/nvim-autopairs/fastwrap.lua+1−1
@@ -6,7 +6,7 @@ local M = {}
66local default_config = {
77 map = '<M-e>',
88 chars = { '{', '[', '(', '"', "'" },
9− pattern = string.gsub([[ [%'%"%)%>%]%)%}%,] ]], '%s+', ''),
9+ pattern = [=[[%'%"%)%>%]%)%}%,]]=],
1010 end_key = '$',
1111 keys = 'qwertyuiopzxcvbnmasdfghjkl',
1212 highlight = 'Search',