Keyboard-driven Mini-Search/Replace


Home » Support » Index of All Documentation » Wing IDE Reference Manual » Search/Replace »

The Edit menu contains a Mini-Search sub-menu that enumerates the available keyboard-driven search options. These are normally initiated with the keyboard command sequences shown in the menu and can be controlled entirely by using the keyboard. All interaction with the mini-search manager occurs using data entry areas displayed on demand at the bottom of the IDE window.

The implementation of the mini-search manager is very close to the most commonly used search and replace features found in Emacs, but it is available whether or not the Emacs editor personality is being used.

The following search and replace features are available in this facility:

  • Forward and Backward -- These display a search string entry area at the bottom of the IDE window and interactively search forward or backward in the current source editor, starting from the current cursor position. The search takes place as you type and can be aborted with Esc or Ctrl-G, which returns the editor to its original cursor location and scroll position.

    Searching is case-insensitive unless you enter a capital letter as part of your search string. To search repeatedly, press Ctrl-U (or Ctrl-S in emacs keyboard mode) to search forward and ``Ctrl-Shift-U (or Ctrl-R in emacs mode) to search in reverse. The search direction can be changed any number of times and searching will wrap whenever the top or bottom of the file is reached. You can also enter Ctrl-U (or Ctrl-S in emacs mode) or Ctrl-Shift-U (or Ctrl-R in emacs mode) again initially while the search string is still blank in order to call up the most recently used search string and begin searching forward or backward with it.

    Once the mini-search entry area is visible, Ctrl-W will add the current word in the editor to the search string. Pressing Ctrl-W more than once while the mini-search entry is visible adds additional words from the editor to the search string.

  • Selection Forward and Selection Backward -- These work like the above but start with the selection in the current source editor.
  • Regex Forward and Regex Backward -- These work like the above but treat the search string as a regular expression.
  • Query/Replace and Regex Query/Replace -- This prompts for search and replace strings in an entry area at the bottom of the IDE window and prompts for replace on each individual match found after the cursor location in the current source editor. Press y to replace or n to skip a match and move on to the next one. The interaction can be canceled at any time with Esc or Ctrl-G. Matching is case insensitive unless a capital letter is entered as part of the search string. Searching is always forward and stops when the end of the file is reached, without wrapping to any un-searched parts between the top of the file and the position from which the search was started.
  • Replace String and Replace Regex -- This works like the above command but immediately replaces all matches without prompting.

« 5.0. Toolbar Quick SearchTable of Contents5.2. Search Tool »