Better Definition Navigation in Sublime Text 3

A small binding so you can command-shift-click things and go to their definition (like command clicking in Rubymine)

This allows you to command-shift-click a method, and it will take you to the definition (Sublime Text 3 only)

Create file

cd ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/User
touch Default\ \(OSX\).sublime-mousemap

Add binding

[
    {
        "button": "button1",
        "count": 1,
        "modifiers": ["super", "shift"],
        "press_command": "drag_select",
        "command": "goto_definition"
    }
]

Should be done.
Go command-shift-click stuff.

About the Author

Plattsi | Other Articles

A twenty something web developer and entrepreneur from Sydney, Australia. Loves building web applications that are both easy and fun to use (and don't require manuals).

  • Pingback: Sublime Text 2 – How to Create Snippets | Web Tempest

  • kernelpanic

    The command
    touch Default (OSX).sublime-mouse
    wouldn’t work directly. Terminal complains on “(” . Wrapping the command with quotes works better.
    Also using .sublime-mouse didn’t work for me, but .sublime-mousemap did on both windows and osx

  • http://webtempest.com Web Tempest

    Thanks…updated

  • JamesMoss

    The command

    cd ~/Library/Application Support/Sublime Text 3/Packages/User

    Doesnt work, there needs to be a slash before the space in Application Support

    cd ~/Library/Application Support/Sublime Text 3/Packages/User

  • http://webtempest.com Web Tempest

    Thanks James – fixed.