【问题标题】:Enable autocomplete or intellisense in Atom editor for PHP在 Atom 编辑器中为 PHP 启用自动完成或智能感知
【发布时间】:2016-05-14 10:10:54
【问题描述】:

我是第一次使用 Atom 编辑器来编写我的 PHP 代码。 Atom 可以自动完成 PHP 的内置函数。是否可以让编辑器自动完成我写在单独文件中的自定义函数?

函数.php

<?php
function printSomething() {
   echo "Hello World";
}

index.php

<?php
require_once "function.php";
printSomething(); // autocompleted by Atom editor while typing

提前致谢。

【问题讨论】:

    标签: php autocomplete intellisense atom-editor


    【解决方案1】:

    %userprofile%.atom 中有一个名为 sn-ps.cson 的文本文件。在那里你可以添加一个 sn-p。

    更多信息:http://flight-manual.atom.io/using-atom/sections/snippets/

    但是您需要考虑以后也可以在其他文件上使用它。否则需要复制粘贴。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-03
      • 2020-03-13
      • 2017-01-26
      • 1970-01-01
      • 1970-01-01
      • 2017-06-10
      • 2015-08-27
      • 1970-01-01
      相关资源
      最近更新 更多