Home » Support » Index of All Documentation » Wing Pro Reference Manual » Source Code Editor »

Multiple Selections


Wing Pro and Wing Personal support making multiple selections on the editor, which is a powerful way to simultaneously edit two or more parts of your code. Most of Wing's editing operations can be applied to multiple selections. For example, all occurrences of a word such as one may be selected and then the o replaced with O to change all of the occurrences to One in a single operation.

The selection-add-next-occurrence command (Ctrl-D, or Command-D on the Mac and Ctrl-> with the emacs personality) is a convenient way to quickly add selections for matching text. When the command is invoked and something is already selected, it will find the next occurrence that matches the primary selection. If nothing is selected when the command is invoked, it will will select the current word.

Whether this search wraps or is case sensitive is controlled from the multiple selections toolbar icon or Edit > Multiple Selections menu. Add next occurrence may optionally remove the selection from the current one and add instead the following occurrrence; this option is bound to Control-Shift-D, or Command-Shift-D on the Mac and Alt-> with the emacs personality.

Multiple selections can also be made quickly within a block, function or method, class, or file by clicking on the multiple selections toolbar icon or using the Edit > Multiple Selections menu.

It is also possible to make an arbitrary set of selections, where the selections do not necessarily contain the same text. This is done by holding the Ctrl and Alt keys (or Command and Option keys on the Mac) while clicking on or selecting text with the left mouse button.

Once multiple selections have been made, any typing, cursor movement, and clipboard commands will act on all selections simultaneously. When there multiple selections, the Escape key (or Control-G with the emacs personality) will drop all of the extra selections.

While there are multiple selections in an editor, a floating window is shown to list all of the selections, even those that are not visible on screen in the editor. An individual selection may be dropped by clicking the X that appears when the the mouse is moved over its entry in the list. Closing the floating window will drop all of the extra selections.

By default, the floating window always appears whenever there are multiple selections. It may also be configured to never appear or to always be displayed even when there is only one selection or no selection. This is done from Display Selections Popup preference, and it may be shown and hidden on a case-by-case basis from the toolbar icon or Edit > Multiple Selections menu.

Multiple Selections