We have been given the green light to talk about some things that we’ve been working on for Embarcadero RAD Studio 2010 (and Delphi 2010 and C++Builder 2010). I figured that was a good excuse to get started here since I do have a couple new code editor features that I’d like to show off.
The search function of the code editor is one of those workhorse features that gets used all the time. While it does its job well, sometimes it seems that it could be a bit smarter. For example, if my cursor is past the instance that I’m really looking for, I often end up invoking to search a couple times to find it. This is because the search only shows one match at a time and it only searches in one direction at a time.
One of the first features I worked on for RAD Studio 2010 was to make the code editor find all the matches all at once. So performing a code search now looks something like this:
Here the "primary" search match is highlighted, just as it always has been (in black here). But now all the other matches are shown as well (highlighted in orange). You can scroll up and down with the scrollbar or scroll wheel and if any other matches become visible, they’ll show up right away.
Each color scheme has an appropriate default color for the additional search matches and the color can be customized as well.
In RAD Studio 2010, we’ve replaced the modal search dialog with a search bar at the bottom of the code editor:
When search is invoked, this bar pops up. It is modeless, so it’s easy to switch back to the editor, for example to copy a search term from the editor. Forward and backward searching is as easy as clicking on the down or up arrows (there are keyboard shortcuts for each, too). The third arrow button restarts the search from the beginning of the file. As before, the search box maintains a history of searches. All the search options can be set by using the checkboxes on the search bar.
Since the search highlighting feature knows where all the matches are, the search bar also shows a count of how many matches exist within the entire file.
Between these two changes, I hope you find the code editor search to be even more useful than ever.