【问题标题】:sublime text doesn't auto-complete all php code.sublime text 不会自动完成所有 php 代码。
【发布时间】:2014-08-08 00:30:55
【问题描述】:

Sublime Text 2 和 3 都没有完成某些变量和函数。我遇到了$_GET$_POST$_SESSION 等问题。

如何解决这个问题,有没有办法可以修改自动完成?

【问题讨论】:

  • 软件特定问题通常最好在他们自己的论坛上提出

标签: php ide sublimetext2 sublimetext sublimetext3


【解决方案1】:

要让PHP sn-ps 工作,我必须更改每个 sn-p 内的范围。

例如,$_GET sn-p。 来自:

<snippet>
    <content><![CDATA[\$_GET['${1:variable}']]]></content>
    <tabTrigger>$_</tabTrigger>
    <scope>source.php</scope>
    <description>GET['…']</description>
</snippet>

<snippet>
    <content><![CDATA[\$_GET['${1:variable}']]]></content>
    <tabTrigger>$_</tabTrigger>
    <scope>text.html - source.php</scope>
    <description>GET['…']</description>
</snippet>

此外,您可能希望将tabTrigger 重命名为GET。这将启用自动完成弹出窗口。似乎特殊字符不适用于tabTrigger。如果你保持相同的触发器,即$_,那么你必须在自动完成菜单出现之前点击tab

【讨论】:

    猜你喜欢
    • 2019-03-28
    • 2015-12-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-07-05
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多