 What does Y do in VIM? Y yanks things and it's more or less like copy. Welcome back to this short series on VIM where we're covering the alphabet in VIM A to Z. I'm Chantastic and today we're talking about Y. Y is how we copy text in VIM and it's called Yank or it stands for Yank. So you would Yank text instead of copying it. Let's dive into our editor. We will open up the quick brown file today. Now the first thing about Y is that you can use it with a motion. So we can do Y to the right and that will copy into our register this one right here. Now to paste we use P which we've learned before. If we want to paste it before the one that's already there we can do a capital P and if we want to undo that and paste it I'm sorry after we can use a lower case P. Now the key is that we used a motion so we just said write to copy the character under our cursor. Now we can Yank words using other motions so we can do Y end to Yank this word and if I paste that in front now we have two vices. Let's undo that. The next use of Y is two Ys in consecutive order. So Y, Y. Y, Y will copy an entire line and we can hit paste and it will paste that line below the line that our cursor is on. So pretty easy command there Y, we'll do that. Now all of these commands typically have a capital version too and capital Y will do the same thing as Y, Y. It's an alias so I did capital Y and if I hit P it's going to insert that below. Now this command is configurable and you can see how so in the help documentation and you can configure it so that it will copy to the end of the line from your cursor that can be useful. I don't personally use it. I really don't like a lot of configuration but that's something that you can do. Finally Y also works with visual selection so if we hit V to get into our visual selection mode hit E a few times to get to the end of words we can hit Y and P will insert that visual selection that we made. We will undo that and if you have any questions you can do the command colon help to find help or H for short and type Y. That will give you all of the documentation for Y. You'll see all the commands that we covered here today. Additionally with information on how to configure capital Y to go from the cursor to the end of the line. That's all I have for you today. I am so excited that we finally covered Y because it is so valuable all the time being able to copy something without having to first delete it. Tomorrow we're covering Z which is the last letter that we're going to cover. I can't believe we made it all this way and more so I can't believe that it took me so long to make my cursor pink so it would stand out more. I barely know what I'm doing. But I'll see you tomorrow with Z.