-- 配置自动tag 包括 下列内容 return { 'echasnovski/mini.pairs', version = false, config = function() require("mini.pairs").setup({ { -- In which modes mappings from this `config` should be created modes = { insert = true, command = false, terminal = false }, -- Global mappings. Each right hand side should be a pair information, a -- table with at least these fields (see more in |MiniPairs.map|): -- - - one of 'open', 'close', 'closeopen'. -- - - two character string for pair to be used. -- By default pair is not inserted after `\`, quotes are not recognized by -- ``, `'` does not insert pair after a letter. -- Only parts of tables can be tweaked (others will use these defaults). mappings = { ['('] = { action = 'open', pair = '()', neigh_pattern = '[^\\].' }, ['['] = { action = 'open', pair = '[]', neigh_pattern = '[^\\].' }, ['{'] = { action = 'open', pair = '{}', neigh_pattern = '[^\\].' }, [')'] = { action = 'close', pair = '()', neigh_pattern = '[^\\].' }, [']'] = { action = 'close', pair = '[]', neigh_pattern = '[^\\].' }, ['}'] = { action = 'close', pair = '{}', neigh_pattern = '[^\\].' }, ['"'] = { action = 'closeopen', pair = '""', neigh_pattern = '[^\\].', register = { cr = false } }, ["'"] = { action = 'closeopen', pair = "''", neigh_pattern = '[^%a\\].', register = { cr = false } }, ['`'] = { action = 'closeopen', pair = '``', neigh_pattern = '[^\\].', register = { cr = false } }, }, } }) end }