我刚为PHP Wordpress循环创建了sublime文本片段。但是当我按Tab键时,它并没有触发。
<snippet>
<content><![CDATA[
if(have_posts()): ?>
<?php while(have_posts()): ?>
<?php the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
<?php endif; ?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<!-- <tabTrigger>wp_loop</tabTrigger> -->
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>
答案 0 :(得分:3)
删除 tabTrigger
的注释行<snippet>
<content><![CDATA[
if(have_posts()): ?>
<?php while(have_posts()): ?>
<?php the_post(); ?>
<?php the_title(); ?>
<?php endwhile; ?>
<?php endif; ?>
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>wp_loop</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php</scope>
</snippet>