Friday, September 11, 2015

Re: Making matchit.vim work properly in angularjs

On Sep 11, 2015, at 2:35 PM, David Fishburn <dfishburn.vim@gmail.com> wrote:



On Fri, Sep 11, 2015 at 5:13 PM, 'Dave Land' via vim_use <vim_use@googlegroups.com> wrote:
On Sep 3, 2015, at 1:14 PM, Christian Brabandt <cblists@256bit.org> wrote:

...
The answer was in :h matchit-details, specifically,

   "The pattern '<' comes first, so it is preferred over '<tag>', which also matches."

This cued me in to the fact that my _regular_ HTML match_words pair was getting in the way of my new angular-friendly match_words pair. I switched 'em around and it works perfectly.



So, what if any custom settings did you use (and where did you set them) for AngularJS support?

No custom settings required, I just had to change b:match_words:

I made a copy of my existing HTML pattern:

    <\([\:0-9A-Za-z_-]\+\)[^>]*>:<\/\1[^>]*>

And removed the requirement that the opening tag have the ">" character on the same line:

    <\([\:0-9A-Za-z_-]\+\)[^>]*:<\/\1[^>]*>

(That is, just before the colon that separates the opening pattern from the closing pattern, the character ">" is gone.)

Thanks for reminding me to read the docs.

Dave

No comments:

Post a Comment