 In Vim, the letter A is for append, append, append, append, append, A, A, append. In Vim, the letter A is for append. How's it going? Today is day number three of Vim Alphabet. I'm fantastic. I am going to teach you the whole alphabet in terms of Vim. If you missed the primer videos, how to get in and out of Vim, and kind of why you should learn Vim. Those are earlier in the playlist. I'll link that below. Today we're talking about A. Now, A just happens to be the first letter in the alphabet, but it happens to be the one of the three ways to insert into a document. Now you might be asking, what the heck does it mean to insert into a document? Every time I open any other code editor, it just lets me type into it. And yes, that's true. The vast majority of editors put you into insert mode by default. Now it's not called insert mode, it's just called editing text. But Vim has a different mindset entirely about how you should use an editor. The default mode of most editors is just one of the modes in Vim. When you go into Vim, you enter into command mode or normal mode, as a lot of Vimmers call it. So, normal mode or command mode. Now what that means is that every key on your keyboard is potentially a command. It is a macro, if you will, to tell Vim to do something that isn't just typing into an editor. What that means in practice is that you need to enter one of those commands to get into the mode where you can type text. Now there are three. There is A, I, and O. There's other ways to do it, but usually it's like a combined command. So A, I, and O are the most common ways to get into a file. Now we're going to start with A today and as I said, A is for append. Now append means to add after. So we're going to explore that. One of the ways that you'll find yourself in Vim needing to add text is in git commit. So I have added a file into our git history here. So if I try to git commit, I'm going to be brought into Vim. Now this right here might have caused you a lot of anxiety. If you were trying to do more stuff in the terminal, I totally understand because you start typing and you get like little red flashes on the bottom. Maybe your thing makes some noises at you. What it's not doing is typing like even if you hit space, it kind of progresses you along. You can use your arrows. Oh, there's one of those beeps. You can use your arrows, but it's all kind of confusing. And if you type enough, eventually you'll get into a thing where you can start typing. Now what you did is you probably hit A, I, or O. Now we're going to just start by hitting A, the first letter, append. What that does is it puts us into insert mode. Vim will tell you when you're not in command mode, which mode you're in. So we are in insert mode right now. And that is what allows us to make a commit message. So we've done that, but now we are in insert mode. So as we learned yesterday how to quit. If we type colon Q now, well, that just gets added as text. This is problematic. So how do we get out of insert mode? Well, we hit escape. Nice and easy. When we're in a mode, we can hit escape to get out of it. Now real quick, before we end this, I want to differentiate the A insert mode for you. Now right now I'm on this S character and you can see that unlike a lot of other editors, we have this block, right? It's a block cursor. Now if I hit A, it's going to append, so it's going to put me, insert me right after that point. Okay? Now I'm on that same S again. If I hit escape, I get back into normal mode and I hit I, which is the other insert command, it is going to insert me before the S. So default insert is before, but A depends after. Now if you're at the beginning of the line, like we were in our original commit message state, I'm hitting A is great. You can just remember what's the first letter A that'll put you into insert mode for these commits. There's one other thing about A and that is the capital A and the capital A also appends, but what it does is it does so at the end of a line. So instead of having to navigate to the end of the line, we can do a capital A at our period, escape, and we're out. Now this is great because there are plenty of times where we want to add something to the end of the line. You forgot punctuation, a special character at the end of the line. I use this command all of the time and it's very easy. Capital A appends at the end of a line. Now as always, if you need more help, you can type colon help in normal mode or colon H and A, and that will tell you everything that you need to know. Now with capital A, there is a count part of this. If you're more advanced in Vim, I leave this as an exploration point for you. But other than that, we're going to use colon Q to get out of that. We're going to cancel this message. So we use colon Q escape to exit without committing. We'll verify that. It hasn't been committed. And that's it. A append. You got it.