Sublime Forum

Next Definition

#1

Is there a way create a command which does the following:

  • open the find anything in @ mode (super+r)
  • go to the next definition (down)
  • select that definition (enter)

Essentially I’m looking for a way to make “goto next/prev definition” commands. I’ve been using the panel itself to move around (which I suppose is the intent of it), but thought it might be nice to not have to take my eyes off the code by just jumping from definition to definition.

0 Likes

#2

I added these to my User/Default (Windows).sublime-keymap:

    { "keys": "ctrl+,"], "command": "find_under_prev" },
    { "keys": "ctrl+."], "command": "find_under" },

Comma and period are on the same keys as < and > so they already have a sort of “previous” and “next” meaning, and they are directly under my right hand so very easy to get to.

0 Likes