Recent

Author Topic: Shortcut "go to implementation"  (Read 3644 times)

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Shortcut "go to implementation"
« on: November 26, 2014, 10:31:06 am »
Is there any keyboard shortcut or any fast way to go to the implementation keyword of the current unit?
I used CnWizards in Delphi for this and I am now searching a similar function in Lazarus as well. Unfortunately I couldn't find anything yet.

I need to switch to the implementation keyword in order to quickly add new units to the uses clause of the implementation section.

howardpc

  • Hero Member
  • *****
  • Posts: 4144
Re: Shortcut "go to implementation"
« Reply #1 on: November 26, 2014, 11:24:50 am »
Go to Package->Install/Uninstall Packages... and in the resulting dialog scroll down the "Available for installation" list until you find JumpToImplementation 0.0, which if selected will enable the "Install selection" button, which you then can press. Save and rebuild the IDE, and you will see that the Search menu now sports a new item: Jump to implementation keyword (which you could assign to a shortcut).

Ondrej Pokorny

  • Full Member
  • ***
  • Posts: 220
Re: Shortcut "go to implementation"
« Reply #2 on: November 26, 2014, 02:20:25 pm »
Thanks a lot! I had only one problem - I could not assign a shortcut to the function because the register function didn't register a TIDECommand in RegisterIDEMenuCommand. I modified the sources for the package and added a shortcut-entry according to http://wiki.lazarus.freepascal.org/Extending_the_IDE#Menu_items. Now I can assign a shortcut to "JumpToImplementation" in "Key Mappings".

I sent this modification to lazarus bug tracker: http://bugs.freepascal.org/view.php?id=27094.

 

TinyPortal © 2005-2018