Saturday, January 24, 2015

Re: Problem with matchit when editing html

On 23/01/2015 04:18 p.m., Christian Brabandt wrote:
> Hi Cesar!
>
> On Fr, 23 Jan 2015, Cesar Romani wrote:
>
>> I'm using vim 7.4.591 on Windows 7.
>> I'm editing an html file with the matchit plugin installed.
>> Using % I can jump from<body> to</body>,<script> to</script>, etc.
>> but not from ( to ), { to }, or [ to ] although "set mps" reports
>> (:),{:},[:],<:>
>>
>> How can I add these pairs whenever I'm editing an html file?
>> If I do, for example, "let b:match_words='(:)'" then all other default
>> pairs get lost!
>
> You need let b:match_words.='(:)'
>
> for the rest see http://vimhelp.appspot.com/vim_faq.txt.html#faq-26.1
>
> Best,
> Christian

Thanks Christian, but it doesn't work. The tags get messed up, even if
I do ":MatchDebug" afterwards.

For example, on the file below, I can't go from ( to ) or from { to },
only from < to > or <script to </script>
but if I do "let b:match_words.='(:)'" I can verify with "let
b:match_words" that the pair is included, but I cannot go from <script
to </script> or from ( to ) anymore.

If I close and load the file again and first run ":MatchDebug" it works.
Apparently this is the only solution.

--------------------
<html>
<head>
<title>Test</title>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
TeX: {
equationNumbers: {autoNumber: "all"}
},
tex2jax: {inlineMath: [['$','$'], ['\\(','\\)']]}
});
</script>
</head>
<body>
This is only a test
</body>
</html>
--------------------


Regards,

--
Cesar

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment