I am trying to find a plugin on Sublime Text 3. Using this plugin I can click a function and go to the definition of this function within my project.
Does this plugin exist? Can you please provide a link? Hope it works on Javascript file, which I am learning right now.
I found this one here, but it does not work. https://github.com/timdouglas/sublime-find-function-definition
I cannot find this plugin in Package Install.
You can go directly to a function declaration in a file by using Goto > GoTo Symbol or using the keyboard shortcut; cmd + r (Mac) or ctrl + r (Windows). Now simply start typing the name of the function you want to jump to.
sublime-find-function-definitionHighlight a function and either hit F8 or right click and go to Find Function Definition . Plugin will search your project for the function and open a file up to it, or if multiple instances found display a list of files to open.
This feature already exists in Sublime Text.
After you select a function you must use F12 and a list with available definitions will appear.
You could check out this answer too: Sublime 3 - Set Key map for function Goto Definition
Edit:
In Sublime Text 3, with Build 3124, the available function definitions are also shown when hovering the function name.
To jump into declaration with the help of mouse. Do following:
Linux - create
Default (Linux).sublime-mousemap
in~/.config/sublime-text-3/Packages/User
Mac - create
Default (OSX).sublime-mousemap
in~/Library/ApplicationSupport/Sublime Text 3/Packages/User
Win - create
Default (Windows).sublime-mousemap
in%appdata%\Sublime Text 3\Packages\User
Copy following lines to the file.
[
{
"button": "button1",
"count": 1,
"modifiers": ["ctrl"],
"press_command": "drag_select",
"command": "goto_definition"
}
]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With