Home Download Buy Blog Forum Support

php function name completion

php function name completion

Postby ShakataGaNai on Sun May 19, 2013 4:53 am

I have several files in my PHP project, if I define a function in one file - ST2 autocompletes the function name in that file. However, if I try in a different file, ST2 does NOT autocomplete. I'm brand new to ST2, so I assume I haven't set something up correctly. What did I do wrong?

Additionally, any suggested guides out there on getting started with ST2 for PHP work?
ShakataGaNai
 
Posts: 1
Joined: Sun May 19, 2013 4:49 am

Re: php function name completion

Postby Verhaeg on Sun May 19, 2013 5:23 pm

Hi there,

ST doesn't really support project autocomplete, in ST3 you have goto_definition that works like a charm, but it does not autocomplete because of several reasons (you may find them in the forums) but basically it needs to create an index for each file and language, and to support all languages would be very hard IMHO. (also wouldn't be fair to other languages if only a few a supported)

you could try using Sublime CodeIntel from Kronuz (https://github.com/Kronuz/SublimeCodeIntel)
in my experience, it worked well in mac and windows, but in linux it usually freezes the index building, specially for PHP

Now, for setting up a PHP development in ST, well that depends on each user, as the way one develops can be very different for everyone.. I usually don't use autocomplete, in ST I just go and open the file I want since is very fast, and in ST3 I can open several files as well with ctrl+P
I don't remember right now where to have some examples of ST setup for developing.. but you may find something useful in Nettuts

Hope this help you
Verhaeg
 
Posts: 12
Joined: Thu May 16, 2013 1:33 pm
Location: São Carlos / SP - Brasil


Return to Technical Support

Who is online

Users browsing this forum: No registered users and 26 guests