dumb-jump
dumb-jump copied to clipboard
Jump from function usage to definition and vice versa [PHP examples]
Currently I can jump from usage to definition, thanks to https://github.com/jacktasia/dumb-jump/commit/7e256808d82d22532030e4c53197426d3e082593 but can't go the other direction
PHP examples
definitions:
class Foo {
function bar() {}
static function bar() {}
}
function bar() {}
usages:
$bar = $foo->bar();
$bar = Foo::bar();
$bar = bar();
Explanation
If I am on a usage, I'd like to jump to the definition. e.g. possible regex:
/function\s+(bar)\s*\(/
If I have the cursor on the definition I'd like to jump to usages. e.g. possible regex:
/(?<!function\s)(bar)\s*\(/
Excellent, thanks for opening this! I will try to get a system to support jumping to usages soon.
@jacktasia cool.
In my opinion, it's not nearly as important as going from usage to definition, which it currently does, so I wouldn't say this is a critical feature, but still useful.
@ryanwinchester FYI #69, which is now available via MELPA, provides functionality similar to this I think. Please let me know if you have any feedback. Thanks!
Hello! Is this implemented in #69?
I would like this feature because I currently do it with grep or cscope and they both suck!
If this is implemented in #69, what's the interactive function to try this out? And if it's implemented, why is this issue open? If it's lack of testing, I can test!
Thansk! :)