Hi, is this possible to have code auto-completion in sublime text for phalcon from https://github.com/phalcon/phalcon-devtools/tree/master/ide ???
|
Nov '14 |
9 |
4059 |
0 |
Hi, is this possible to have code auto-completion in sublime text for phalcon from https://github.com/phalcon/phalcon-devtools/tree/master/ide ???
You can use: https://sublimecodeintel.github.io/SublimeCodeIntel/
You can get the phalcon stubs autocompleted with that plugin
I have added this folder https://github.com/phalcon/phalcon-devtools/tree/master/ide/1.2.6/Phalcon to project folder, but for example, when I type: $this->flash-> then in popup is only "Direct (class)" and "message (function)", there is no "success", "error", etc autocompletion.
You can also use alternatice PHPDoc approach
/**
* @property Phalcon\Flash\Session $flash
*/
class IndexController extends \Phalcon\Mvc\Controller
{
public function indexAction()
{
$this->flash->error('message');
}
}
Yes you can write it in BaseController.
With views I don't think this is possible ($this in phtml file is really weird for me), but maybe someone else will have answer how to do it, because my knowledge is one year old. Currently I don't use autocomplete in SublimeText at all :(
I've downloaded the devtools. How do I add the stubs for Sublime Text to actually see and use them? I've tried dumping them into Users/Library/Application Support/Sublime Text 2/Packages and restarted the app. No change.
Can someone - in a very specific and thorough way - explain how to add code completion for phalcon in Sublime Text without assuming anything?
Can this question not be answered? Or is the solution so obvious, that people simply ignore it for being to stupid?
@blaasvaer: I posted instructions in the thread you originally opened for this: https://forum.phalcon.io/discussion/2185/how-to-add-code-completion-to-sublime-text-#C8270
I made a competions package for Sublime Text. You can download it here on github or search package control for phalcon
and it should come up.