 So how do you navigate to different lines in your document using VIM? Well, you're going to use the G key for that. Unfortunately, it does a lot else as well. Hey, welcome to the next video in VIM alphabet, a series where we cover VIM from A to Z, literally every letter in the alphabet one at a time. Today, we're talking about G. Now G is a cluster. It is, it's got a bunch of stuff jammed into it. And I think that the approach that I'm going to take is just going to show you, I'm going to show you the things that I use most. And those are going to be the navigation, like go to line. So a lot of people think of G as go to, as in go to this line, go to this line, go to a place in the document. And that works for a subset of the things that G can do. But it can also be used as a modifier, a general purpose modifier to a lot of the other commands. So for that reason, I don't like to think about G as go, but only a couple of the commands as go. But typically I think of G as general or garbage. There's just so much stuff jammed into it. And usually I show you the help at the end, but today I'm going to show you from the beginning. So we're going to look at help for G real quick. And you can see that there are a lot of G commands. Now, typically it's like you have the lowercase version, the uppercase version, maybe there's like a double letter and that's kind of about it. Not so with G, G really is stuffed with a bunch of stuff. There are two keys like this is G and Z. And they just are kind of the junk drawers for a lot of additional commands. Now, that isn't to say that G has to be complicated. You can just learn the things that you need to know and you'll be good to go. A lot of these things are really kind of like obscure and bizarre anyway. And you'll see that in many cases that G just acts as a prefix to other letters that you already know kind of changing their behavior just a little bit slightly. So for example, G E, we know that E goes to the end of a line go backwards to the end of the previous word. So whereas E usually moves forward, G capital E will move backward. What I want to show you are a handful of G commands that I use all of the time. So the first one, I'm going to use the arrow keys to navigate down a little bit is double G, G G. That will take you to the first line in your document. Pretty simple. Now capital G will do the opposite. Capital G will take you to the bottom of your document, the very last line in your document. So again, G G to go all the way to the top, the first line, capital G to go all the way to the bottom. Now, what if we want to hit any of these lines in between? Well, we can use a number, so like two and capital G, and that will navigate to the number that we provided prefixing the command. So if we go for G, that'll go to the fourth line. Now, not all files have these line numbers here because I added these just to differentiate which one was which. So in Vim, I'm going to show you another command where we can do set, which is setting a preference or a variable, I'm going to say number. Set number gives us line numbers for each of our numbers. The opposite of that is set no number and that will turn those line numbers off. Now, what I wanted to show that to you for is so that you can kind of see how this would work and if you wanted to use it, that you would be able to see those line numbers if you're not just throwing line numbers in the dark. Where this becomes particularly useful is if you are in a testing environment and it tells you that the file is bad at a certain line, you can just go to 3G for lines three. Now you're on line three, you know exactly where to go. So this is a very useful tool. I'm going to show you one more thing which has to do with visual mode. In visual mode, you can make a visual selection as we've covered before. Something very cool. This is really one of the G commands that I use the most or G prefixed variations that I use the most. If I do G and V, it will reselect the last visual selection that I made. So that's just a little bit of a bonus. I think the other ones are going to be more useful to you generally. So again, GG goes to the top, first line document, capital G, bottom of the document, last line. And then if we give it a number and capital G, it will go to the line number that we gave it. So that's it, that's everything that you need to know about G right now. If you want to see what else is in there and see if there are any helpful alterations to commands that we've already learned, you can dive in there with the help and kind of find something fun and exciting for you to use. But really that's it for today. Tomorrow we will be covering H, J, K and L. Now I'm doing those together because they would be really boring individual videos if we did them individually. But that's what we will cover tomorrow. I'll see you then.