【问题标题】:Sublime text 3 custom snippets not triggeringSublime text 3 自定义片段未触发
【发布时间】:2016-01-24 11:29:09
【问题描述】:

我刚刚为 PHP Wordpress 循环创建了 sublime text sn-p。但是当我按 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>

【问题讨论】:

    标签: php wordpress sublimetext3


    【解决方案1】:

    删除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>
    

    【讨论】:

    • 您可以发布您当前工作文件的屏幕截图吗?
    • 好的,我只是添加我的 php 文件的屏幕截图
    • 请添加
    • 天哪,我觉得自己像个傻瓜,不想取消注释。谢谢。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-01
    • 1970-01-01
    • 2018-05-06
    • 1970-01-01
    • 1970-01-01
    • 2013-05-31
    相关资源
    最近更新 更多