RAD Studio XE Code Editor Search Shortcuts

Posted by on in Blogs
Now that RAD Studio XE has shipped, I have a chance to post about some of the features that I worked on. Most of my time has been spent working on some features for future versions that I cannot talk about yet. But I did make a few small improvements to the RAD Studio XE code editor that are worth highlighting. I'll start with my favorite little feature: a couple of keyboard shortcuts for searching in the code editor. I find myself using these new shortcuts several times a day.

When I'm searching for something in the code editor, I often know that the instance I want to find is above my cursor position. In previous versions of RAD Studio, I would usually press Ctrl+Home to go to the top of the file, then begin searching, hitting F3 a bunch of times until I found what I was looking for. In RAD Studio 2010, I would sometimes use the mouse to click the up arrow on the search bar, but the muscle memory of pressing Ctrl+Home, Ctrl+F would usually kick in before I thought of grabbing the mouse.

In RAD Studio XE, there are now two new keyboard methods for initiating a search: Shift+Enter and Ctrl+Enter. To use them, first invoke search (Search/Find, or Ctrl+F, or the equivalent in your favorite keybinding) and type your search term. Then to start your search, you can press:

  • Enter to search downwards.

  • Shift+Enter to search upwards.

  • Ctrl+Enter to search from the beginning of the file.


These keystrokes work only for initiating the search. As in previous versions, to find the next instance of the search term, you use the repeat search keystroke (in the default keybinding, F3 to search again downwards or Shift+F3 to search again upwards). Note that these new shortcuts do not change the search direction or scope for future searches. They are one-time modifiers.

This isn't a big feature, but it's one that I find myself using all the time.

In my next post, I'll point out a few other little editor changes in RAD Studio XE.


Comments

  • Guest
    Gad D Lord Tuesday, 7 September 2010

    the new search feature is quite disturbing for me. Especially pressing down forcing the previous search to be selected (I am a Mac user and down is used for End, and Up is used for Home).

    Is there a way to completely switch off the new search and bring back the old dialog?

  • Guest
    Jan Derk Tuesday, 7 September 2010

    There is still a problem with Incremental Search: Incremental Search does not go up. It means that I still have to hit Ctrl+Home and then Ctrl+E in Delphi XE to start searching. Could you please fix that in the next version?

    So if the incremental search does not find a hit downwards it should look upward. My Ctrl and Home keys will be gratefull.

    The strange thing is that incremental search already looks upwards once you started at the top of the file. But not if you start in the middle or end of the file.

  • Guest
    Xepol Tuesday, 7 September 2010

    Any chance they have fixed the find shortcut keys? For example, alt-W for whole words doesn't actually toggle the check box in 2010, but rather opens a new welcome page (I'm using the IDE Classic key mappings)

    I too would vote for the old search dialog, if only because the search option hotkeys are just so completely broken in older versions of the IDE (and, I assume, are still broken in the current version - but give it a try, let me know.)

  • Guest
    Xiaoyi Zhang Tuesday, 7 September 2010

    Why not make a SHIFT-F8 Feature in SourceInsight, it's very easy to use.

  • Guest
    Jeroen Pluimers Tuesday, 7 September 2010

    I second the vote for the old search dialog.
    --jeroen

  • Guest
    Darren Kosinski (Embarcadero) Wednesday, 8 September 2010

    @Gad D Lord: There is no way to bring back the old search dialog.

    @Jan Derk: Incremental search has always worked by searching only downwards. However, I could see some benefit of having incremental search use the wraparound logic. Please add your request to QC as a feature enhancement and we can consider it for a future release.

    @Xepol: The shortcut keys (like Alt-W) work for me. Note that your cursor must be in the search box for these shortcuts to work, otherwise they do indeed conflict with some menu items. This was true in RAD Studio 2010 as well and it is by design.

    @Xiaoyi Zhang: Can you explain your request in more detail? In the default keybinding, Shift+F8 is used for debugging (run until return). How would this be used in SourceInsight? Or are you talking about a different use of Shift+F8?

  • Guest
    Jan Derk Wednesday, 8 September 2010

    @Darren Kosinski (Embarcadero):
    Me posting a request in QC is the best way to make sure that something will never happen. Or that a bug won't get fixed.

    If you think it is a good idea feel free to add the request yourself.

  • Guest
    Xepol Wednesday, 8 September 2010

    @Darren -> My D2010 does not work like yours for some reason. Even with the cursor in the search box, pressing alt-w fires up a new welcome page.

    Alt-C, Alt-S, Alt-R all work as expected but alt-W ALWAYS fires up a welcome page regardless of foucs for me.

    I'll install XE probably next week and see how it behaves.

  • Guest
    Nick Hodges | Flotsam and Jetsam #8 Sunday, 12 September 2010

    [...] functionality in RAD Studio’s code editor caused some consternation for a number of folks, and Darren Kosinski made some changes that will hopefully de-consternate those [...]

  • Guest

    [...] 「RAD Studio XE Code Editor Search Shortcuts」より。 [...]

  • Guest
    Jays Wednesday, 5 January 2011

    How can I search through (open or all) project files now?

  • Guest
    Darren Kosinski (Embarcadero) Wednesday, 5 January 2011

    @Jays: The Find in Files feature is used for this. It can be activated from the "Search/Find in Files" menu item or with the shortcut Ctrl+Shift+F in the default keybinding.

  • Guest
    Jays Wednesday, 2 February 2011

    Setting a bookmark "0" does not work in XE 15.0.3953.35171 using CTRL+Shift+0 as usually. Boomarks 1-9 are OK.

  • Guest
    Darren Kosinski Friday, 4 February 2011

    @Jays: Ctrl+Shift+0 correctly toggles the bookmark for me. You may want to make sure that you don't have some other program installed which may be intercepting that shortcut.

  • Please login first in order for you to submit comments
  • Page :
  • 1

Check out more tips and tricks in this development video: