20

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.

Nicolas S.Xu
  • 10,813
  • 27
  • 63
  • 112

2 Answers2

35

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.

Community
  • 1
  • 1
Catalin MUNTEANU
  • 5,440
  • 2
  • 32
  • 42
1

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"
    }
]
Community
  • 1
  • 1
Sujin Shrestha
  • 918
  • 2
  • 7
  • 21