Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Placid's avatar

Sublime PHP Companion - import_namespace

I am trying to use https://github.com/erichard/SublimePHPCompanion. But I'm having a hard time with the import_namespace command. I have set the key bindings as: { "keys" : ["f4"], "command": "import_namespace" }

But when I execute this command, its not generating proper namespaces. For example, in app/Foo.php, it generates the following namespace: namespace C:\wamp\www\laravel\test1\app; where it should be: namespace App;

Again, in app/Http/controllers/FooController.php, it generates the following namespace: namespace Http\Controllers; where it should be: namespace App\Http\Controllers;

Does any one know how to make this command work properly?

0 likes
4 replies
Placid's avatar

Thanks @tomo_pongrac for your response. I am using this key binding for expand_fqcn:

{ "keys" : ["f9"], "command": "expand_fqcn" }

and its working properly, but the import_namespace is not working correctly.

pn523's avatar

Try this

{ "keys": ["f4"], "command": "import_namespace" },

Please or to participate in this conversation.