In addition to the traditional click-and-drag way of selecting contiguous text in a file, Studio provides language-aware selection, multiple selection of the occurrences of a string and selection in column.
Studio is "language aware" when it comes to selecting rules code.
To select a word inside a
.crfile, put the cursor on it and press
To extend the selection to gradually larger elements of the code, keep pressing
To progressively shrink the selection press
Multiple string selection
Multiple string selection allows you to quickly select and edit the occurrences of a string wherever they are in the code.
To create a multiple selection:
- Select a string—it can even be a single character.
Alt+Jto select the next occurrence.
Alt+Jagain to go forward, or
Shift+Alt+Jto go back, but note that when search reaches the end of the file, it will start over from the beginning.
While you select, you will see more blinking cursors, one for every selected occurrence.
To replace all the selected occurrences just enter the replacement text once.
You can get a similar result by selecting the occurrences found with file search.
Column selection mode
Column selection mode allows multiple code selection in columns. It might be helpful when you want to edit several lines of code simultaneously.
By default column selection mode is disabled.
To toggle column selection mode:
- Right-click in the editing area and choose Column Selection Mode.
Once the selection mode is enabled, to select columns of text just click and drag the cursor.
You will notice a blinking cursor to the right of each segment of the selection. This is to indicate that the text you enter will be repeated in every segment.
Selection mode change is effective for the current editor session only. If you close and reopen the editor, the default selection mode will be restored.