Jump to implementation of procedure/function lazarus / 9-Editor ---------------------------------------------------------------------- russdirks · 2015-12-19 00:35 Is there any way to jump directly to the implementation code of a procedure/function/method?  The only way I can figure out how to do it is a two step process : Alt-H, followed by Ctrl-Shift-UpArrow.  Sure would be nice to do it in one step, especially via a right-click menu.  For me at least, 99.999 percent of the time it's the implementation I'm interested in, not the declaration. Edit: Meant to say Alt-Up, not Alt-H ---------------------------------------------------------------------- balazsszekely · 2015-12-19 05:09 Perhaps you should record the key combinations with the macro recorder, then play it back whenever you need it. Ctrl+Shift+R  --> Alt-H + Ctrl-Shift-UpArrow --> Ctrl+Shift+R Ctrl+Shift+P --> to play back ---------------------------------------------------------------------- russdirks · 2015-12-19 05:48 Thanks!  That's definitely an improvement! ---------------------------------------------------------------------- Edson · 2015-12-19 16:39 I would find useful this feature, too.  I think, it could be an item of the popup menu: "Jump to implementation". ---------------------------------------------------------------------- User137 · 2015-12-19 20:23 Ctrl+Shift+Down goes to implementation, when you are hovering the definition of procedure. And with Up key back to definition. ---------------------------------------------------------------------- russdirks · 2015-12-19 21:05 Quote from: User137 on December 19, 2015, 09:23:00 pmCtrl+Shift+Down goes to implementation, when you are hovering the definition of procedure. And with Up key back to definition. On my system (Laz 1.4.4, Win10, all defaults), Ctrl+Shift+Up is mapped to "Find Procedure Definition" and Ctrl+Shift+Down is mapped to "Find Procedure Method".  In practice though, I find they both do the same thing ... if you press either of them repeatedly they will jump back and forth between the method declaration and the method implementation. What I was talking about in my OP, though, was when you encounter a *reference* to a method/procedure somewhere in your code, either in the unit it is defined in, or even another unit, and you want to jump to the implementation of that method/procedure.  The only way I can find to do that is Alt+Up, followed by Ctrl+Shift+Up  (or Down). ---------------------------------------------------------------------- guest58172 · 2015-12-20 02:01 Not to mention that in the LCL the declarations and the implementations are often located in two separate files. So after the hiting the two shortcuts you often have two new pages in the editor. ---------------------------------------------------------------------- Never · 2015-12-20 06:37 ref [ http://forum.lazarus.freepascal.org/index.php/topic,15688.msg161 610.html#msg161610 ] are others too ref suggestion [ http://bugs.freepascal.org/view.php?id=27016 ] are others with similar  subject the subject discussed and rejected i make use of these macros to overcome also post them here [ http://www.pilotlogic.com/sitejoom/index.php/forum/ct-tools/3004-ide- macros-you-might-find-them-usefull-as-well ] -------------------- SelectProcedure -->Selects the current procedure JunpToDefinition-->Jumps where the code is actualy writen for the identifier /<--- This is the one you are talking about ( implementation) JunpToProcedureStart-->Jumps at the declarations place of the procedure JunpToProcedureEnd-->Jumps at the last [end] of the procedure EncloseParametr-->auto encloses the next word to the current selection from the drop down auto complete list ex. if your current word is ainteger and you are writting writeln[ call the macro here ]ainteger you will get writeln(ainteger); JumpToFirstOccurence-->useful when you are in the declaration place of a class field and you want to locate the first reference in a property declaration -------------------- hope you will find them usefull you can import the xml using the import command from the macro editor pay attention to the key assignments maybe you prefere other combinations ---------------------------------------------------------------------- russdirks · 2015-12-20 17:38 @Never, Thanks.  Your JumpToDefinition is pretty much exactly what I got when I recorded Alt-Up, Ctrl+Shift+Up into a macro. ---------------------------------------------------------------------- Never · 2015-12-20 20:20 @russdirks, you are welcome, i'm glad you found them useful