我是第一次使用
Atom编辑器来编写我的PHP代码。Atom可以自动完成PHP的内置函数。是否可以使编辑器自动完成编写在单独文件中的自定义函数?
功能.php
<?php
function printSomething() {
echo "Hello World";
}
索引.php
<?php
require_once "function.php";
printSomething(); // autocompleted by Atom editor while typing
提前谢谢。
%userprofile%.atom 中有一个名为 snippets.cson 的文本文件。在那里,您可以添加一个片段。
更多关于这个: http://flight-manual.atom.io/using-atom/sections/snippets/
但是,您需要考虑以后也可以在其他文件上使用它。否则,您需要复制和粘贴。