I’d like to know the shortcut to select multiple separate text strings on Mac.
I tried SHIFT, command. If I use shift, then it selects all the text in between the two set of text strings I’d like to select. I tried to use command key, but as soon as I pressed it and tried to select another separate text string, it deselected the previous selected string. I’d like to know the shortcut with which I would be able to select multiple separate strings at once. (Those text strings are not adjacent to each other).
Ieva_Brakmane is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
To select multiple separate text strings on a Mac, you can use the following steps:
-
Enable Mouse Keys (optional, but can be helpful):
- Open System Preferences.
- Go to Accessibility.
- Select Pointer Control (or Mouse & Trackpad on older versions).
- Enable Mouse Keys.
-
Select the First Text String:
- Click and drag to select your first text string as usual.
-
Select Additional Text Strings:
- Hold down the Command (⌘) key.
- While holding the Command key, click and drag to select another separate text string. Continue holding the Command key and select as many additional text strings as needed.
Unfortunately, macOS’s native text editors (like TextEdit) and many other common applications do not support multiple separate text selections out of the box. However, some advanced text editors and IDEs, such as Sublime Text, Visual Studio Code, and Atom, do support this feature.
Example in Visual Studio Code:
-
Install Visual Studio Code (if not already installed):
- Download and install from Visual Studio Code.
-
Open a File in Visual Studio Code:
- Open the file where you want to make multiple selections.
-
Make Multiple Selections:
- Hold down the Option (⌥) key (Mac) or Alt key (Windows/Linux).
- Click and drag to make your first selection.
- Continue to hold the Option key and make additional selections by clicking and dragging.
Using a dedicated text editor or IDE with built-in support for multiple selections will significantly streamline this process and provide more powerful editing capabilities.
VISHWAJEET JHA is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.