In this lesson, we'll introduce Vim and Vim modes. We'll teach you how to move around in Vims normal mode, and how to copy, paste and delete text. Now let's talk about Vim. Vim is a text editor, not a word processor. This is an important distinction. A word processor, such as Microsoft Word, stores documents in a binary format that includes not only the text that you type, but also data about fonts, style, maybe tables, images, all sorts of non-text information. Vim as a text editor only saves text. The text you type into a file in Vim is exactly what's saved to that file and nothing more. Vim is based on the vi text editor, which was an editor that was available in very early flavors of Unix. Because of this, vi was designed before there was any computer mice or user interfaces. The only way to interact with the computer then was through a text terminal. Hence vi and now Vim are based on keyboard only interactions. This means that moving around a Vim file is very different than moving around a modern UI based program that relies on you having a mouse. One thing Vim offers is a great deal of customization. There's lots of settings that you can change and a huge ecosystem of plugins. The developers who relied on Vim as their main programming interface, customized their setups so that each developer almost has a unique set-up. Another thing to know about Vim is, because it goes back to the vi that was available in the early Unix systems, you can find Vim on any Unix or Linux machine. This means that if you have to log into a server to look at logs or something else, Vim will always be there. You can always use it to do your work. Because Vim uses the same keyboard that you type your text to do all of its commands. It has what's known as modes. The first mode is the normal mode and that's the mode that when you fire up Vim, you'll be in. That's the mode where you move around a file and do a lot of other non-text input type operations. The next mode is the insert mode. This is the mode in which you type in text. There's a visual mode that does certain types of special selection and the command line for executing special commands and doing search and find and replace. To move around the modes we need to use special key combinations. The normal mode is your home base. It's where you start. To get from any other mode to the normal mode, use the escape key. This is an important thing to remember. A lot of times people new to Vim will get themselves in a mode and be confused and not quite know what's going on. You can always press the escape key to get you back to the home, which is the normal mode. Now when we're in the normal mode and we want to navigate round a file, there's some primary navigation that we need to learn. Once again, this is probably the steepest part of the Leaning curve for people moving into Vim is getting introduced to navigating using the keyboard. You use h to move left, j to move down, k to move up, and l to move right. I'll show you an example. Here I have a file opened in Vim. If I press the l key, my cursor move to the right. I hold it down, it keeps moving. If I press the J key, I go down. If I press the k key I go up and the h key to the left. If you press a number before pressing one of these keys, let's say I press 5 and then the l key. You'll move that many spaces. I moved to five spaces to the right by pressing the l key. This is the part that people really need to practice the most, is getting these keys down until they're comfortable in your hand. In addition to learning the home keys is those are called, there's other ways to move around a vim file. W will move you forward one word. B will move you back to the beginning of the current word. E to the end of the current word. Double g, will take you to the top of your file, and an uppercase g will take you to the bottom of the file. Here's my cursor. If I press a w, I go to the next word. I press e, I go to the end of that word, b to the beginning of the word gg takes me to the top of the file. If I press capital G, I go to the bottom of the file. Some other important keys to learn when working in the normal mode are keys for copying, pasting and deleting text. The y key copies highlighted text into a buffer, which is known as yanking. Yw will copy a word of text. Yy a whole line of text. P is used to paste. X will delete a character and a double d will delete a line. We'll look at the single y key later on when we go into the visual mode. But for now let's look at the other options. If I do yw and then go somewhere else and press p, it paste that word. If I do double y and then press p, it copies the whole line. If I press x, it removes the character that's under the cursor. If I press double d, it removes the whole line. This lesson you've learned about vim modes and how to move around vims normal mode, as well as how to copy, paste and delete text. Now you should practice in Vims normal mode.