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

Add 'switch' as a snippet #10

Closed
katrinkerber opened this issue Jun 12, 2015 · 6 comments
Closed

Add 'switch' as a snippet #10

katrinkerber opened this issue Jun 12, 2015 · 6 comments
Labels

Comments

@katrinkerber
Copy link

Would be great if switch could be a tab trigger to output:

{% switch condition %} ... {% endswitch %}
@BenParizek
Copy link
Member

Thanks Katrin. I'll be sure to get this in the next version. Working on releasing it soon!

@BenParizek
Copy link
Member

The next release will have a switch tab trigger like below, with tab stops at the variable and values:

{% switch variable %}

    {% case "value1" %}


    {% case "value2" %}


    {% default %}


{% endswitch %}```

@BenParizek
Copy link
Member

@katrinkerber
Copy link
Author

That's brilliant, thank you Ben.

I've just tried to upgrade in Sublime, but I am getting this error:

Error loading syntax file "Packages/Craft-Twig/Syntaxes/HTML (Twig).tmLanguage": Error parsing plist xml: Failed to open file In file "Packages/Craft-Twig/Syntaxes/HTML (Twig).tmLanguage"

@BenParizek
Copy link
Member

Hey Katrin,

I think this is just a cache or session issue due to some name changes in the underlying files. Can you try to:

  1. Uninstall your previous version of Craft-Twig
  2. Remove any cached version of Craft-Twig in `~/Library/Application\ Support/Sublime\ Text\ 3/Cache/
  3. Clear the sublime session in in`~/Library/Application\ Support/Sublime\ Text\ 3/Local/Session.sublime_session
  4. Reinstall the Craft-Twig package

@katrinkerber
Copy link
Author

That worked a treat, thank you very much Ben :)

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

No branches or pull requests

2 participants