Skip to content

v- @ : directives support #66

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 17, 2017
Merged

v- @ : directives support #66

merged 1 commit into from
Apr 17, 2017

Conversation

woat
Copy link
Contributor

@woat woat commented Apr 16, 2017

@adriaanzon
Copy link
Collaborator

adriaanzon commented Apr 16, 2017

How does it highlight this snippet for you?

<template>
  <div v-if="a && b">
    <div :class="{ a: true, b: false }"></div>
    <button @click="trigger('hello')">hello</button>
  </div>
  <my-component :bar = "[0, 1, 2]"></my-component>
  <my-component :bar-foo="[0, 1, 2]"></my-component>
  <my-component :bar2foo="[0, 1, 2]"></my-component>
</template>

For me, it seems to only highlight when there are two words separated by a hyphen:

image

@woat
Copy link
Contributor Author

woat commented Apr 17, 2017

@adriaanzon Good catch, mine is identical:

After changing the pattern from

"[@v:][-:.0-9_a-z]*-[-:.0-9_a-z]*\>"
                   ^

to

""[@v:][-:.0-9_a-z]*[-:.0-9_a-z]*\>"
                   ^

Seems to work good:

I'll update the commit accordingly, thanks.

@adriaanzon
Copy link
Collaborator

The second [-:.0-9_a-z]* is now redundant so you can remove that as well 😆

@woat
Copy link
Contributor Author

woat commented Apr 17, 2017

@adriaanzon Haha, vimscript patterns are a horror 😷

Updated.

@adriaanzon adriaanzon merged commit 27dc461 into posva:master Apr 17, 2017
@adriaanzon
Copy link
Collaborator

Cool, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants