On 15 May 2014, at 15:59, Ken Snyder wrote:

I'm guessing this isn't possible but I'd love to have my 'doc' tab trigger
for PHP distinguish between the namespace it is in. Is this possible?

There are two options:

  1. Put the namespace in the scope. We do this for C++, so for this code:

    namespace oak
    {
        ‸
    }
    

    The scope contains meta.namespace-block.oak.c++. Though we don’t actually use this extra information for anything.

  2. Change the doc⇥ trigger to run a command that takes ‘document’ as input and have the command itself extract the namespace and act accordingly. In Objective-C we do that for the logm⇥ and super⇥ snippets, the first one inserts a log statement that output all the parameters passed to the method, the latter inserts a call to the superclass.