I'm just trying to find out how can I auto-import methods of an implemented interface.
Example:
//LoaderInterface.php
interface LoaderInterface
{
public function load($endpoint);
}
//myLoader.php
class myLoader implements LoaderInterface
and here after writing implements LoaderInterface
I would use some command to ends up with
//myLoader.php
class myLoader implements LoaderInterface
{
public function load($endpoint)
{
//do something
}
}
I've tried sublimeCodeIntel
but it seems to me that is not possible, or am I doing wrong?
Because I couldn't find something helpful, I've now decided to try to write my first plugin. At my first experience in Python.
Just in case someone could use it or help me improve this plugin.
https://github.com/ilpaijin/Sublime-Text-2-AutoimportSignature-Plugin
There is a way in sublime_text
copy and pest these code
*save*
as whatever name You want
<snippet>
<content><![CDATA[
interface ${1:LoaderInterface}
{
public function ${2:load($endpoint);}
}
//myLoader.php
class myLoader implements ${3:LoaderInterface}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>loader</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<scope>source.php - variable.other.php</scope>
</snippet>
Note:
loader
in beet been <?php ?>
tag . 1 More thing to remember most save Your file as .php
call
Your snippet by Typing other Key Word
You can put that keyword in beet-been <tabTrigger>**keyword**</tabTrigger>