PeterPanettone 182 Posted Monday at 09:34 PM (edited) OK, here is another simple trick I often use to quickly jump to specific locations in very large units (e.g., 20,000 lines, like in my upcoming "Advanced Windows Start Menu"): We could use simple bookmarks for this purpose, but I often clear them all after finishing a specific short-term task. So we need something more persistent:* *Prerequisites: CnWizards 1. Create these kinds of comments on the locations you want to jump to quickly: implementation // toc_implementation public // toc_public // toc_PrivateVariables private // toc_private TForm1 = class(TForm) // toc_MainFormClass // etc. 2. Then put all these TOC items at the very top of your huge unit: {TOC: toc_implementation toc_public toc_PrivateVariables toc_private toc_MainFormClass } 3. Then, when you need to quickly jump to one of these locations in your huge unit: - Press CTRL+Home to jump to the top of the unit - Double-click one of the toc_ items to select it - Press F3 to quickly jump to this location This will save you a lot of search time! Edited Tuesday at 01:46 PM by PeterPanettone Share this post Link to post
dummzeuch 1720 Posted Tuesday at 07:16 AM 9 hours ago, PeterPanettone said: - Double-click one of the toc_ items to select it - Press F3 to quickly jump to this location Hm, interesting. I didn't know that F3 automatically searches the next occurrence of the selected text. [testing it] No, it doesn't, at least not in my Delphi 13 installation. I have to press Ctrl+F and enter first. 😕 ?? Share this post Link to post
PeterPanettone 182 Posted Tuesday at 09:00 AM 1 hour ago, dummzeuch said: Hm, interesting. I didn't know that F3 automatically searches the next occurrence of the selected text. [testing it] No, it doesn't, at least not in my Delphi 13 installation. I have to press Ctrl+F and enter first. 😕 ?? It doesn't?? In my Delphi 12.2 and Delphi 13, it does! This is very strange! Share this post Link to post
PeterPanettone 182 Posted Tuesday at 09:22 AM I've found it: F3 automatically searches the next occurrence of the selected text only if CnWizards is installed. I've tested it by unloading CnWizards. When CnWizards is not loaded, then F3 on the selected text displays this message: And then, when clicking the "Yes" button after having checked "Wrap around without asking", this message is displayed: This could be a bug in the Delphi IDE that CnWizards resolves. 1 Share this post Link to post
PeterPanettone 182 Posted Tuesday at 09:41 AM (edited) CnWizards is a very helpful Delphi IDE plugin with many useful features, among them the above-mentioned F3 SEARCH feature: https://www.cnpack.org/index.php?lang=en Here is the option to activate this feature: Edited Tuesday at 12:04 PM by PeterPanettone 1 Share this post Link to post
Uwe Raabe 2203 Posted 5 hours ago MMX has a feature Find next/previous occurrence: Place the cursor somewhere into the specific identifier and press Shift+Alt+Right/Left. You can combine this with the IDE Search Enhancement feature, which adds all identifiers of the current unit to the Ctrl+F search box. 2 Share this post Link to post
pyscripter 837 Posted 2 hours ago (edited) 3 hours ago, Uwe Raabe said: MMX has a feature Find next/previous occurrence: So does GExperts, but the MMX one is nicer :). Edited 2 hours ago by pyscripter Share this post Link to post