Search code examples
delphidelphi-7

How to go to definition of method or procedure in Delphi 7?


How to go to definition of method or procedure in Delphi 7? If ctrl key + mouse-click, it goes to the method declaration. I want it to go to the actual method instead, similar to "go to definition" in Visual Studio.

Update:

I want to jump to where proc2's code is defined.

procedure proc1

begin 
  proc2
end

Solution

  • It's a two-step process:

    1. Ctrl+click the identifier you want to navigate to. That will take you to the declaration (as you've already observed).
    2. Once the cursor is on the declaration, press Ctrl+Shift+ to navigate to the corresponding definition.

      You can press that key combination again to go back to the declaration. (The up and down arrow keys are equivalent in this keyboard shortcut; it doesn't actually matter whether you want to navigate up or down within the file.)