Welcome back. In this guided exercise, we'll put our skills to the test and learn to edit files using Vim. First we'll request it to ssh over to the server a. I'll use the command ssh student@servera. Excellent. We can see we've now logged in with key-based authentication. Next, we're asked to launch the vimtutor. Once launched, read the welcome screen and then perform Lesson 1.1. To launch vimtutors, simply type the word. It lets us know that we're about to perform exercises in order to learn the commands for Vim. Something that calls out very specifically is to ensure that your Caps-lock key, is not depressed before you begin. Also, you can navigate the screen by using the ''J key'' to be sure that lesson 1.1 fills your screen. As I've got mine zoomed in, much larger than you probably do by default. I may have some struggles and reduce that, from time to time. Excellent. We can see here that the j, k, l, and h keys, can be used for navigation, these four keys are all in a row, so you can learn to use them to navigate. These also serve the same purpose as the arrow keys, but there are many keyboards, especially older keyboards, that may not have those keys. Therefore, Vim has alternative ways to navigate around the environment. They have asked us to move around, to make sure we have this navigation. Press a combination of the j, k, l, and h keys, until you get comfortable with each one's design. Continue to press the "j" key to move through the exercise, you can hold the j key in order to scroll faster. Now, that we've completed lesson 1.1. Let's go back to our instructions. The helpful hint here on how to remember, what each key stands for here, is the mnemonic phrase, hang back, jumped down, kick up, and leap forward. That way the h key can help you remember that you go backwards on the line. The j key for jumped down goes down align, kick up, the k key goes up align, and leap forward, leaps to the right or forward on the line. Next, we'll move into lesson 1.2. This will help you understand how to quick leave the editor, without keeping any unwanted changes, the changes will all be lost, but sometimes, if you're editing a critical file, you may want to simply back out if any erroneous information was accidentally entered. As instructed, makes sure to read all steps before you perform any of them. Step 1, will have his press the "Escape" key to make sure you're in the normal mode. You'll type colon q exclamation point and press "Enter" in order to exit the editor, discard any changes you've made, and safely returned to the command prompt. You'll get back to this location by executing the command that got you into the tutorial, which was Vim tutor and pressing enter. If you have those steps memorized and you know what you're doing, go ahead and execute those steps. I'll do so now, by pressing "Escape": q exclamation point and hitting "Enter" we've returned out of the tutorial. As instructed, we can retype vimtutor, to return to our work. Now, that the Vim tutorials open backup, we can arrow down or use the j key, to return to our place. Lesson 1.3, shows that Vim has fast and efficient ways to navigate throughout words and lines of a document. We can use these to affectively delete an exact number of words or lines, sentences, or even whole paragraphs. Whereas in step one to move the cursor to the line below, marked dot. Then to fix the errors, move the cursor until it is on top of the character to be deleted. Press the "X" key to delete the unwanted character, and then repeat steps 2-4 until the sentence is correct. Let's go ahead and move to the end of the line. Now, we're asked to go ahead and use the x key over any erroneous characters. I'll delete this last o first, using the x key. We'll move over to one of the h is either one, and hit the "x" key. Continue to proceed backwards over the line, eliminating the extra characters, until you fully corrected the sinate's. Now, that you've learned how to use the x key to delete single characters. Let's proceed into lesson 1.4. Here, lesson 1.4, teaches us about text editing. We use the i key to enter into the insert text mode. Step 1, tells us to move the cursor to the first line below marked with the arrow, to make the first line the same as the second move, the cursor on top of the first character after, where the text is to be inserted. You'll press "i" at that time and then type the additions. As each character's fix press the "Escape" key to return to normal mode. Repeat steps 2-4 until all of the updates are made. Here is the first line, where there is some text missing from this line. As well as some characters, will want to arrow over while they are the same and while there. Once we see some differences, we get to a point where we need to edit some text, will hit the "I" key to insert here and type some space. Now, that we've corrected that part, we can hit "Escape" to get out of editing, and continue to move forward. Notice I'm putting the cursor where I need to have additions added after the cursor. Here, I want to put additional characters after the first s. I'll hit "I" to enter the same mode. Let's continue to arrow over until we get to the next spot that needs correcting. Here we can see that some letters are missing from the word missing. We want to put the cursor exactly, where we wish the characters to be inserted. Characters will be be inserted between the s and the n, if "I" press I in this position, I'll hit "I" to enter Insert, type in the two missing characters and hit "Escape" to exit Insert mode. Here, we know that we need to add an entire word from. I'll align, hit "I" type from an a space and then hit "Escape" to exit. The last piece should go over the period, hit "I" type line. We've now completed the editing that makes this line the same as the one below it. In this 1.5 lesson, we'll learn that keystrokes can be used to change the cursor placement, when that text editing occurs. Here, we'll use the A to a pintech, will move the cursor to the lines below, and it doesn't matter which character the cursor is on in that line. Will press the "A" "Shift" and the A key and type in the necessary additions. Once the text has been appended, press "Escape" to return to normal mode, and then perform all the work to correct these lines to make them identical before finishing the work. Here we can see that some text is missing from this line, there's also some missing from this line. We'll move the cursor to first line below as instructed, will press "Shift" and "A" to jump to the very end of the line and append what's missing, from the end, will then hit "Escape" to go back to normal mode. We go down to the second line and we can hit "Shift" and "A" to jump to the end. We can say that there's also some text missing from this line. Now, that we've added or appended text to the end of the line, we can see the value of the A, gives us when we need to append content to the ends of lines. There is also some texts missing here. I was able to use the insert and then my backspace to delete the keys that I had accidentally put in place there. Lesson 1.6 teaches us that the w and q commands will allow us to write and quit the files. We've already seen this, but let's go ahead and reinforce it by writing out and saving our changes to this file. If you did lesson 1.2, you can quit and use the exclamation point to force the exit without saving change. If you like which you changed and you wish to change to exit out and save your changes. You'll use the: wq command. I believe we did a great job correctly completing all of this work. We'll write out and save our work, so" Escape": w to write out our work, q to quit. Now, as instructed, let's retype them tutor and proceed to the lesson 1, summary located at the bottom of the experience. I'm using j to hold all the way down to the lesson 1, summary. To summarize what we learned, h is used in tandem with the left key, j for down, k for up, and l for right movement. We can start Vim by typing "vim" in a file name in order to launch the editor. We can exit Vim a few ways that we've learned, using the q or q exclamation point to exit without saving changes and using the wq command, in order to save changes and exit. Where a normal mode, we can use the x key to delete a single character located under the cursor. Then we learned how to enter Insert mode using i at the place of our cursor or A for at the end of the line we're currently on, the Escape key will always return us back to normal mode. Then we can feel comfortable saving or exiting the file as we save it. I hope you enjoyed this guided exercise on editing files using Vim. I look forward to seeing you in the next video.