How to Access a Class through "Ctrl+Click" in Sublime Text 3
Asked Answered
J

2

5

I've got this class as an example:

Which plugin do I use to be able to click on:

PHPUnit_Framework_TestCase

And get to the class?

class PracticeTest extends PHPUnit_Framework_TestCase {
    public function testHelloWorld() {
        $greeting = 'Hello, World.';
        $this->assertTrue($greeting === 'Hello, World.');
    }
}

Right now I have to manually search for it. I know PHPStorm has this functionality and I believe Sublime must have a plugin for it.

Thanks a lot.

Jackhammer answered 7/7, 2015 at 17:35 Comment(1)
Possible duplicate, the answer to your question has been given here https://mcmap.net/q/2034882/-can-i-click-to-get-to-a-method-object-in-sublime-text-like-i-can-in-netbeans/1125161Flaxman
T
4

Click on class name that you want to jump and press f12.

Tetany answered 28/5, 2017 at 13:24 Comment(1)
how do you jump to a class which is in another fileCerys
J
3

Avalance pointed in the comments to a threat that hinted to SublimeCodeIntel.

And indeed SublimeCodeIntel allows for the behaviour I needed:

See here: https://github.com/SublimeCodeIntel/SublimeCodeIntel#using

The solution to jump to definition is this:

For Mac OS X:

Jump to definition = Control+Click
Jump to definition = Control+Command+Alt+Up
Go back = Control+Command+Alt+Left
Manual Code Intelligence = Control+Shift+space

For Linux:

Jump to definition = Super+Click
Jump to definition = Control+Super+Alt+Up
Go back = Control+Super+Alt+Left
Manual Code Intelligence = Control+Shift+space

For Windows:

Jump to definition = Alt+Click
Jump to definition = Control+Windows+Alt+Up
Go back = Control+Windows+Alt+Left
Manual Code Intelligence = Control+Shift+space
Jackhammer answered 7/7, 2015 at 17:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.