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

Scope of theloop snippet is wrong? #21

Closed
niels-k-86 opened this issue Nov 1, 2013 · 2 comments
Closed

Scope of theloop snippet is wrong? #21

niels-k-86 opened this issue Nov 1, 2013 · 2 comments

Comments

@niels-k-86
Copy link

Hi Purplefish,

I noticed a bug while using the snippet for the WordPress loop. The snippet (theloop, tab) has a PHP scope, yet the snippet itself contains tags.

Perhaps you can edit the snippet so it doesn't contain the php tags or change the scope for the snippet?

Thanks :).

@jahvi
Copy link

jahvi commented Nov 10, 2014

👍

@the-unsoul
Copy link

You can create your own snippet by copy and paste this in a file then save it as something.sublime-snippet and put it in your Packages>User folder.

(Or using Package Resource Viewer plugin to modify The_Loop.sublime-snippet file in Wordpress Package)

Cheer!

<snippet>
    <content><![CDATA[
if(have_posts()):while(have_posts()):the_post(); ?>
    ${1:<!-- post -->}
<?${TM_PHP_OPEN_TAG:php} endwhile; ?>
    ${2:<!-- page navigation --> }
<?${TM_PHP_OPEN_TAG:php} else: ?>
    ${0:<!-- no posts found -->}
<?${TM_PHP_OPEN_TAG:php} endif; 
]]></content>
    <description>The Loop</description>
    <tabTrigger>theloop</tabTrigger>
    <scope>source.php - variable.other.php</scope>
</snippet>

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

3 participants