In the new IDE 2.0 which is almost perfect the ability to find and replace in all files (tabs) is not available. Is there a reason or is that something that will be added, hopefully sooner than later? I still have to open the original desktop version to search all sketch tabs.
Hi @frankbicknell. It is available. Just click the magnifying glass on the "activity bar" on the left side of the window. I think you will find it is a very capable find and replace tool.
Please let me know if you have any questions or problems.
I see that now thank you so much. It is now perfect.
You are welcome. I'm glad if I was able to be of assistance.
I see the search appear when you click the magnifying glass. Where is the replace?
Hi @stormingmoose. Click the ❯ icon on the right side of the search field:
That will expand the replace interface:
These kids that can only use a mouse Maybe the IDE should supply an onscreen keyboard where they can click the letters
ctrlF to open find.
ctrlH to open search and replace.
ESC to close
TAB to cycle through the fields
SPACE to activate an option
Thank you, that was well hidden.
No search results for quick keys in Reference
You are welcome. I'm glad if I was able to be of assistance.
Arduino IDE 2.x has a keyboard shortcut management feature. Select File > Advanced > Keyboard Shortcuts to open it.
The keyboard shortcuts are listed there. You can also customize them and add shortcuts for additional actions.
Perhaps a dumb question, but I have the global search/replace working but when I find a match, I don't see a way to replace just that match. I see the "Replace All" option, but my experience is that's a train wreck waiting to happen. I replace one at a time...always. How do I do that?
Hi @econjack. If you hover the mouse pointer over the individual results in the "Search" view, a "Replace" icon will appear to the right of the result. Click that icon to apply the replacement only to that specific result:
Find does not search all tabs. I noticed the 4th icon (circle with eye brow), which is missing from my options. How do I make Find search all tabs?
Hi @olam2023. There are two separate sketch search interfaces in Arduino IDE 2.x:
- A per-file search accessed by selecting Edit > Find from the Arduino IDE menus
- A sketch global search accessed by clicking the magnifying glass icon on the "Activity Bar" at the left side of the Arduino IDE window.
So if you want to search all tabs, click that magnifying glass icon:
Then use the "SEARCH" view that opens in the side panel:
thanks
You are welcome. I'm glad if I was able to be of assistance.
Regards,
Per
I finally got find and replace to work following your cookie crumbs here. Thanks.
But the commands will not find terms in comments. Comment wording in either "//" or "/* */" frames are ignored. Version 1x makes this work. Given many people use them to tag sections of code, which is helpful jumping around with 50,000 lines across 20 tabs. Can we put this on the to do list? For now I'll keep my version 1.8x installed.
Hi @krhorner116. It works fine for me:
Please provide detailed instructions I can follow to reproduce the problem you encountered so I can investigate.
You are correct. I uninstalled and reinstalled 2.1.1 and it worked, although it can be tempermental. One search I just tested came up with a split screen on the code side with two different versions of the tab, on the left the location of what was found, and on the right the found item replaced by a search term from a prior search. And I don't think I called for a replacement. But other search and replace terms worked fine, and it would jump to the location when the item in the list was clicked on. Sometimes it would fail to clear the search term, and I'd have to manually delete it. Having been doing software for 50 years, I understand how long it took to get 1.18 to the point it was at... years. I'll just keep at it. Good luck and thanks.
You are welcome. I'm glad it is working now.
This is the normal and expected behavior when you have something in the "Replace" field of the Search view.
The field contents are persistent so even if you changed the contents of the "Search" field, or opened and closed the Search view, the "Replace" field will remain populated with the text you added there before.
It is of course not expected if you don't have any text in the "Replace" field. If you are able to reproduce this when you definitely don't have something in that field, please do let us know and we'll investigate.
It's not clear to me what you mean by "clear the search term". As I mentioned, the intentional design is that the contents of the fields are persistent. So it is not expected that the IDE will ever automatically remove the text you added to the "Search" field. But maybe you are referring to some other unintended behavior.
2 posts were split to a new topic: The split screen doesn't close