How to select multiple lines of code and space them all?

2.3k views Asked by At

This may be a fairly simple answer, or relatively easy; though I haven't been able to find the correct command/way to do so from anywhere.

As the title states, I'm trying to figure out the way as to space multiple lines of code.

Here's an example of what I'm looking for:

testing = "Testing"
work = "Work"
answer = "Answer"

Now I'd like to add spaces to the first two lines (selected together) at the same time, as in:

    testing = "Testing"
    work = "Work"
answer = "Answer"
1

There are 1 answers

0
TRose On BEST ANSWER

Hold CTRL and click at the beginning of each line.

This will create two cursor points and every command will be iterated at every point.

Another tip:

You can highlight a selection of text, and CTRL + D will highlight all matches for that text and activate a cursor next to it. Very useful for mass editing in things like tables or forms.