This is a more advanced task that will show how to select and edit multiple lines and columns of text.
Since this task is most useful with a list or multiple columns of text, you'll want to start out with something like the following:

The steps to manipulate multiple lines and multiple columns of text are as follows:
Make a selection, ending the selection after the final character of the last row, as shown in the following screenshot:
Switch to Column Selection by pressing the Option key, or from the menu, select Edit | Change to Column Selection:
Edit the selection by holding down the Shift key and moving with the arrow keys. In this case, hold Shift and tap the right arrow key once to complete the full column selection:
While the column is selected, you can move it by selecting Text | Move Selection | Column Left (Command + Control + left arrow) or by selecting Text | Move Selection | Column Right (Command + Control + right arrow).
To edit all of the lines in a selection, make your selection, and from the menu, select Text | Edit Each Line in Selection (Command + Option + A). Once this is done, start typing and each line will be changed:
Though the column manipulation is mainly used for data organization, the Edit all lines in a selection option has some very practical use cases for editing code. For example, if you have a list of items in HTML but don't want to copy and paste list item tags (that is, <li>
) for each line, you can use the following set of keystrokes to quickly surround all of the items in <li>
tags.
Select all of the lines, press Command + Option + A, and start typing the opening tag (<li>
), followed by Command + right arrow (to move to the end of the line), and type the closing tag (</li>
):
