Occurrence Selection

Poor man’s manipulation to the rescue!

00:00
00:00

Where we go, we don’t need Find & Replace! 🛹⚡️

Using actions for occurrence selection is a powerful way to transform and manipulate all kinds of texts. We start by making a selection for our text. With every call to Add Selection for Next Occurrence we get another multicaret that can be moved around, insert and delete text, expand or shrink its individual selection, or toggle the casing of its text. This is exactly what we need if we have to fix only a couple of similar invocations or change the format of our data! 🎭📐

Remember to always use meaningful names! 🏷 Invoking Unselect Occurrence removes the previously added selection; Select All Occurrences scans the whole document for occurrences and selects them.

But remember: always give refactorings a try first! 🔧🤓

See Also


Related Resources

Arrays
Arrays
Arrays are a straightforward and traditional way to work with a set of data.
HashSet<T>
HashSet<T>
Use the HashSet<T> type for high performing data sets with unique elements.
Dictionary<T>
Dictionary<T>
Use the Dictionary<TKey, TValue> type for strongly-typed, dynamic, sets of data stored with keys and values.