Closed Carlosmape closed 2 years ago
Well, yes. items()
returns an array and not a map, and bad things happen when the method iterating allPairs
gets an array instead of a map.
Shameless plug for my fork though, where there's both fancy assignment, and the variable for language-specific pairs has been exposed.
And obligatory disclaimer that depending on what's in html5map
, you may be better off with something dedicated to [xht]+ml tags than trying to brute-force HTML into the plugin with an enormous dictionary of applicable tags. Neither jiangmiao's original auto-pairs, nor my fork is able to do contextual substitutions at this time
Thx for your reply.
Okay I will take a look to your fork! The alvan/vim-closetag Sound like good approach to solve that issue, I will check it too.
I tried to assign withou items()
too but keep giving me errors.
I guess this issue can be closed 😄
As in variable
allPairs
in functionAutoPairsDefaultPairs()
it should be a good idea to allow users to has it owns "tagfile" and add to the plugin. e.g:AutoPairAddCustom('html', 'html5filetags')
I have already created an HTML5 tags and I am having troubles to add to these map
allPairs
. I tried to edit the plugin adding:source html5.vim
where I defined a map containing all tag pairs and then trying to add to theseallPairs
like this:let allPairs = { \ 'vim': {'\v^\s*\zs"': ''}, \ 'rust': {'\w\zs<': '>', '&\zs''': ''}, \ 'php': {'<?': '?>//k]', '<?php': '?>//k]'}, \ 'html' : items(html5map), \ }
But NVim allways is outputting errors. definitively IDK how to modify a vimrc script 😓