Instructor: A couple of years ago, just like you, I was trying to learn all these power user workflows. Today is your lucky day because I am going to teach you how to deal with lines, how to juggle with words, and how to do those multi-cursors thing, if you know what I mean.
Anyway, before we start, I need to tell you that I am using MacOS. When I say Command, that should be Control on Windows or Linux or other OS. Similarly, when I say Option, you should know that I mean Alt on other OS.
Let's begin. Now let's talk about one of my favorite workflows, the multi-cursor workflows. You're going to be using the mouse or keypad for this multi-cursor workflow. Let's say you want to change all of these background colors to a one single similar color. What you can do is you can press and hold Command and then click wherever you want.
See, my cursor is growing in size and now I can select it and make it wide, or whatnot. Again, press and hold Command and then click. See. Now all these areas are editable.
I can also drag a multi-cursor. For that, I need to press and hold Command and Shift. For example, let's say I want three cursers, here, here, and here. Let's put our cursor here, press and hold Command and Shift. Now drag this cursor down here. Now I have these three cursors.
I can do it in a much larger way as well. For example, let's put our cursor here. Press and hold Command and Shift, and drag and down to here. See how many cursors we have, one cursor for every line from 720.
Whether you want to create a multi-cursor with keyboard without even using a mouse or keypad, you can do that very easily. For example, let's again do same thing here. See in the background inaudible of all these buttons to buy tomato.
I'm going to press and hold Command and Alt, and then I'm going to press the down key. Now I can select them and tomato here. Tomatoes are inaudible . Now I can press Escape to escape out of these multi-cursors. Similarly, I can go up as well. Press and hold Command and Alt, and press the up button. There you go. That's pretty cool.
Now let's do the multi-cursor selection thing with just keyboard. What I want is three cursors here, here, and here. I'm going to use keyboard only to do this. I've pressed Shift and then down, down, down to select these three lines. Now I'm going to press Command, Shift, and L and boom, there are these three cursors that we needed.
Let me do this again. Shift and down to select these lines. Now Command, Shift and L. There you go. We have as many cursors as we want. Let's select all of this file with Command A and Command, Shift, L with four cursors after every single line. That's pretty cool.
The last one here is how to undo the last cursor. Imagine you wanted to change these colors. You press Command and Alt, and then down, down, down. There is this extra cursor that you didn't need. Press Command U and you will undo the last cursor action. Command U, Command U.
Similarly, if you are going up, then, then, then, Command U, Command U. Command U will just undo the last action of your cursor.
This is also true for your mouse and keypad. Click here, select Command and Shift, and then drag it out here. We didn't need this last one. I am going to press Command U, and there it's gone.