Skip to content
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

Special vue tags do not autocomplete #154

Open
joshgoebel opened this issue Jul 14, 2018 · 4 comments
Open

Special vue tags do not autocomplete #154

joshgoebel opened this issue Jul 14, 2018 · 4 comments

Comments

@joshgoebel
Copy link

So we need something like this?

{
    "scope": "text.html - source, punctuation.definition.tag.begin",

    "completions":
    [
        { "trigger": "slots", "contents": "<slot>$0</slot>" },
        { "trigger": "component", "contents": "<component :is='$1'>$0</component>" },
        { "trigger": "transition", "contents": "<transition>$0</transition>" },
        { "trigger": "transition-group", "contents": "<transition-group>$0</transition-group>" },
        { "trigger": "keep-alive", "contents": "<keep-alive>$0</keep-alive>" }

    ]
}

It's annoying that the Vue special tags can't be tab completely like any other HTML tag. I can make a pr if this would be welcome, or perhaps there is a better way?

@joshgoebel
Copy link
Author

Ping?

@skyronic
Copy link
Collaborator

Hi @yyyc514

Thank you for taking the time to point this out and look into possible solutions. I apologize for the delay.

I personally think this would be useful. I just don't want to interfere with emmet or other packages. Moreover this is just a syntax highlight package, and I believe there are other packages in place for snippets.

@yyx990803 do you have any thoughts of including snippets in the extension?

@joshgoebel
Copy link
Author

joshgoebel commented Jul 19, 2018

Emmet looks nice (installed). It doesn't work out of the box with Vue files though, so I'm not sure this would be a conflict. Someone using just the syntax would get the snippets for free... and someone who decided to specifically turn on Emmet for .vue files would know they were manually killing snippets (the docs mention this) in favor of Emmet.

At least that's what it seems like from reading the docs: ("How to expand abbreviations with Tab in other syntaxes")

https://github.com/sergeche/emmet-sublime/blob/master/README.md

@joshgoebel
Copy link
Author

And of course Emmet's default keybinding (Ctrl-E) isn't going to conflict with the snippets at all.

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

No branches or pull requests

2 participants