How to use Vertical Editing
One of the most useful features of EmEditor is vertical editing. Vertical editing is useful when you want to enter the same text into multiple lines.
There are two points you should be careful about when using vertical editing. The first is to use a fixed-pitch font. Proportional fonts have different character widths and may not work as you intend to. If a proportional font is currently selected, we recommend that you select a fixed-pitch font such as “Courier New” by selecting Fonts on the Toolbar, and then clicking the Change button under Display Font.
Secondly, if you are currently using wrapped lines settings, select the “No Wrap” settings. If you use vertical editing while lines are wrapped, you might edit two places in one logical line, and which could result in unintended results. The wrapping settings can be selected by the four toolbar buttons, beginning with “No Wrap” to the right. The “No Wrap” button should be selected.
Let’s try vertical editing. Suppose you have the following city names.
and suppose you want to insert a tab and a double quote ( “) at the beginning of each line, and a double quote and a comma (“,) with sequential numbers at the end of each line to produce an array definition:
To enter a character at the beginning of each line, first make a vertical selection at the beginning of the lines. To do so, press the left mouse button while holding the ALT key. Then while holding the mouse button, drag the mouse from the first line to the last line. You will see a gray line at the beginning of the lines as shown below:
At this step, pressing tab and double quote ( “) inserts them at the beginning of each line.
Next, make a vertical selection at the end of the lines. If you make a zero-width selection, the selection moves to the end of each line even if the lengths are not the same. Otherwise, the selection will stay at the same vertical position.
Type a double quote and a comma (“,) to insert them at the end of each line.
Then you can select Advanced on the Edit menu, and then select Numbering to insert sequential numbers:
In this case, we are adding numbers from 1 through 10 at the end of each line.
Lastly, you can add another comma at the end of each line, and then add text to define the array before and after the whole text to get the following array definition.
As you can see, vertical selection editing makes your life easier, and improves your productivity.
To start vertical selection, drag with the mouse while pressing ALT key, or press CTRL + SHIFT + F8 and then make a selection using arrow keys.
You can also use many features, including replace, uppercase/lowercase, half-width/full-width, that work only within the vertical selection. Enhance your productivity by using vertical selection!