jps wrote:For example, it'd be nice if the PHP completions included arguments for the functions (via the snippet syntax), and if there was an HTML plugin to complete tag attributes.
Can I ask how exactly would this be best implemented?
For example I see a snippet for require:
- Code: Select all
All well and done, however how can I get the require snippet to only expand if the auto-completed valued is require()? Because the tabTrigger for all the array_* functions would be the full function, but then to get the benefit of the snippet the user would have to do:
array_w<tab> (expands to array_walk(|))
<backspace> (now array_walk|)
<tab> (now array_walk(|$array, $funcname);)
I can provide the snippets without problem, but is there a way they will be smart about not requiring the <backspace>+<tab> step?
Here is a PHP.sublime-completions that has been updated from php.net today, omitting Class references (as is in the original file) and with proper argument counts for every function: https://bitbucket.org/vostok4/sublimeph ... ompletions
Feel free to include it in ST2 if you like, or if we figure out the snippets I'll provide all that code instead.