Basics of VI Editor

Manu Mitra
A free video tutorial from Manu Mitra
Executive - IT Operations
3.5 instructor rating • 207 courses • 49,063 students

Lecture description

Vi Editor

Vi Editor Cheat Sheets

UNIX Cheat Sheet

Learn more from the full course

Essentials of Unix Operating System

Basics of Unix Operating Systems

04:54:26 of on-demand video • Updated January 2019

  • Basics of Unix Operating System
  • Basic directory and file movement commands
  • Basic VI Editor
English [Auto] Okay. So welcome back. So this is probably or the last gasps or uniques most probably could be the last class. Oh it will be a long day today because we are discussing the hard part of the uniques that is really dark. Right. So very editor is one of the hard not to Pakistan part seems really harsh but screen OK. So I think the problem is you know we're the thing which makes this hard these go way the navigation of the cursor. We know that there is a concern you can navigate into an unlimited sea. Let's straight understand what is exactly. This reality is what. So what's the egg donors on about. Now you see this more funding for windows that you type here we're doing one right now. It's a code you know on this thing so you can type your videos in it it's so easy that kids can do this right and save it in darkness and safe havens goes into the want to see everything. So that's not so easy in Unix. It's again no pi d no padding windows. Is actually read Wii U during Unix. Now it's like you're comparing apples to apples but due to the A not Apple Apple needs some Apple right. That's hard it is. So enjoy it. That's the reason I know I use on the is we may see peanuts and these new avenues university you know I call on it do this not bad and just don't Piers that's done for this headache on this I did. But no we are. We don't want that. Right. We want to know what is the HD and how does it work. Because that's. That's no reason we have this unique right. So we want to know this and we want to understand it while we are editor. So if you do and I know you think my whole class if you don't understand anything you know this is a Unix cheat sheet to cheat you you know guess what. You have all this while Barry explained in that class plus you have access to this. Oh my. It's not right. So what. Greg server the Unix for practice so I don't think it is a problem unless you have quite a problem. Only my accent my accent and speed that's the only thing I can understand the problem addressed. I think it is a problem. You know or that it is the only thing I could think of treatment that if you come up with some videos I'm not sure. But you know you can see here it is Unix cheat sheet you know as we are proud of this one. We have so far worked on each of compressing time to move. OK. We didn't work on installation. We don't have any admin access. Don't worry about it. But it's do you have an idea of using that to move your time if you want to get used to it get used to it. No. We didn't use most numbers. We just used phase navigational phase and like you said no mistakes. OK now let's have some hard time here. No this is Unix cheat sheet it's just Luxembourg right. OK. And guess what kind of just cookies. Number one. You know there are many options here. So you can use whatever you want. OK. I'm just using this for now we can use this be a deterrent. All right. OK. Well let's try to see the movement come out now. Well first we have to open with the jury to see which directory I mean for minorities all countries deciding when to use it. He will see their text. That's what we get in our own lists type VII. And then see on Google Earth some moves example that we can't see you here a year digs deep. Let's see how the screen changes before you. Now this is the VIP door. This is a hard thing. You never see no. Thing is. The problem is you may not use it in some Unix flavors. You can use this keyboard at all. OK. Keyboard arrows you can get it there if you see this. Obviously it's not I won't take any guidance. OK. We try to type something OK. This is a sound full text OK. Great. We have done great job breaking into the editor. This is more than word activities which start. Hit enter. You know these things are working this is fine. This is my second line in me. I editor really made a remarkable achievement here. OK. This is my core line being the i it too. And this is my achievement right. Mike Greene Well this is not this doesn't tell this moment help anymore anyone can do this. Now you want to know this. OK. Let's let's make one more line. This is my fault line. Here you go. I mean there's a mistake here but all right now this thing gets tricky here. All right. I cannot since I didn't I made a mistake so I knew that score those arrows would work. So are you designed or All right. Well we made a lot of mistakes here. OK all right. Now despite that simple that that's looks like OK I know this since we had this four lines of text you mean actor feels good. You know I can see very sweet and this is done. No that doesn't work. No it's good backdoor here movement. This movement here. All right. It says make change for you. Just to help here. Let me get to the street. The key is for movement here. That's right left these hedge down these. Up is key. Ian Lee what is this all about. So what do you want to do here is this spirals are working right. But you know what he uses has hit escape and try keep us working. I'm very fortunate to just keep working and keep track. And if you want to go live here hedge now is it is that I'm doing this when I'm in this Skip mode. You have to click the escape without escape. That means the move you're changing the mode of the CBA. OK. Head which is movement of light because you're you can use arrows. Luckily this is working arrows because no government minister. Before that it was much more harder. So forget hedges McGee l l left to right arrow and J J Now now now let's get back to it. Hit escape again. We are in writing Morgan says it's in Sagamore a card is in more. You can't use this term using the siren system. So you cannot use this arrow to go want to use it but you see distinctly seem to give the movement commands. This is for escape. You want to hit escape before being out is because if you do hit give JPL the know what. Let's do this. So what do we do here is if you put dust kicked Game Day is not working. As of your cheat sheet we are in a good head. Jay page J he yells it's not working. What do you want to do for that is the after he escapes only. Then you could move that hedge. J first K No j for not give a damn. There's no doubt. So it's really the unknown. Hitch is 4 left 0 4 right here for up and J put out tracking our game. If I have to go back to my writing mode hit a step I know I'm getting back my reading work now I can pay NBC right. So this was you know this is as simple as that. It's put you on this one. Well the one you're using is command I have to put escape we don't escape you can't escape. You have to use this gift. I know going back to this. This is really tricky here. Much progress. So what we do here is OK. So what do you want to do here is you can do for all this. This text OK this document you can harness and number. Here's what I'm trying to see here is I want to hit. I can write right now. OK. OK. You can write here. And I'm not talking just yes it's working. Right. Now what we do here is given got changed my escape. I know I'm in writing mode. Thank you OK. Now what we do here is this is the writing mode. OK. The thing works good. This D OK now what I do is a hit escape and daughter command and see what happens. This is it goes the last column of the current line. OK so far one group is trying this case. Nah last column of the current map. So you should push this concept. 30 escape yeah that worked. See this escape. Come on let's take your studies some here. We didn't Are any of it anywhere other than laugh. If I want this discuss circle move the last line he escape and it goes to this nothing. Okay. That's about moving your consent to the last line. Good huh. That's one thing. Now next since go. This is the moment of the castle. The next will go to hit escape and parties. Oh. This gives us. Into my street. Doing it again can do this Monday. Bunch times escape. Shift Oh during the space here. Kind of hitting enter so it causes the first column gives a space here. I think the new to change a scheme. Skippy. Great. I can delete that line by 0 2 Can we not do you market OK. So no this is really very tricky. You want to play this more and more and many times because you have to cheat became part of that you cheat. It's mine are getting shows and the thing is this simple burglary amount. All right all right now let's go to the next one. There is no escape and this is what happened. Are interesting. Now let's say your castle is here in Congo putting your toe first. I mean the same line here. You want to put it here right. So let's do this escape. Shift 6. Trigger that is a skip to in 1966. Okay. This is the moment of the castle with you. Something you want it to last escape uppercase. Escape daughter you move your castle to it and writing an escape. Enough to move your concept to left. This is movement on the cusp or a good idea to move forward with this. There is escape. The work is done move is to move the next character is. You know as we are moving closer to this kind of escape escape government moving into the next character. See that you need progress. Keep going. I knew this was OK you've got a steep dollar and we're going to skip dinner. That's good. Remember escape. Daughter goes to the right side and escape. Do not push it Lipsyte. Just moving your car so he had nothing else doing that scene this woman of course. OK now we'll go to. All right. An escape w most to the next character froze to power and decided to move on. Okay. No escape w see him moving my car sir in due next character. Okay. No escape. Uppercase w. Wow that's more complex. See what happens. Escape a Protestant home. I mean just a guess so most parts of the next space okay. Christopher similar over Bluebird. You're using them. But that has some reason to do that. For now we just don't worry about it okay. Let's go to the next one. All right. So we won't escape capital B gives you the space here. OK from this time I you to skip absolute peak one more space or even Beaver Murphy you can get as many of these more so the deleting is really escape quick beliefs my lord. STV So that gets the deniers in just beginning and I just like that see here. If I'm here and I could escape me. Sorry. Days to make escape dollars. This is what so no let's go to this E. and see what happens to the escapes. It's going to you know this certainly is actually moving to the next. You know the line of you know the not too line of the last character of that work. The last kind of back next to it. So that worked under the similar way to just get Captain Lee from the west coast the last line of the script. Hey good. Now we have escaped uppercase Hatch is the ghost of hope. That's the home part of the screen. Okay. If your car is meaning of the escape hatch code ghost goes pop up creep. Escape L that goes lower on the screen bottom of the screen name escapes and goes in the middle of the screen. This is this moment of crisis is I. This is pretty hard but you could do it in a loop Birkhead just using a CB in his birth. You want to know this but then you have done that. And what is next is key. This is my favorite Scooby to. What do I do here is escape x. Do they need a character to explain. I guess it's like guess he did they did but not so different meaning lowercase and uppercase Xs if you lower case X. There is that I think I forget X didn't serve of. Okay so what I want to do is escape Loki so I get to delete it escape no work is escape no. So to use back this is you have to put I mean escape I do insert from that stuff and try to reduce your arm if you only use this or to use escape I am so not doing now what was that the state capital B I know where they came from. Skip right now. So what do you do here is just use this one. All I'm doing is not working now. What do you do here is we know BD skip begins to delete line we can delete the line skip OK word if you want to delete this ball word what you want to be escape VW. The whole world get to take this to work we can't they go on a date I guess escape needless fighting on the date my escape fought the whole world. Dude I'm sorry this are interesting news. I don't know why right. This was how hard the issue of me I was. It was made like me use users struggle to just confuses things. OK that is funny ok for me. Did you get a word. No. Day three let. If you want to later escape. Let's do something else. OK so is key. Hola skip colon and the word to one to be so far we have done this. I see a filing quit saying fight and great sin right. Fine so we will do. Great. To say do right. So and call on Alex. So since you read we are editor OK. We can go back. Yes we have this right here. So if you want to quit again. If you want the great escape Poland Yeah. If it saves the fight and quits the V.A. studies right now if you want to save the town Wait there's a bigger team to do it. Escape Poland. Don't say that that doesn't seem anything in the script. So that was this requires a lot of practice. Actually that's the reason you have this called this cheat sheet. You want to follow this cheat sheet. OK. And you can make any changes you want and get out. So based on my best companies dealing I was in the room with Didi. That's the best thing I could do. Excuse me for living this life. Weird that and you can put the deleted text off sort of by putting escape for his speech. This actually add some. All right. Jake Tapper excellent actually you see this spin they ruined underneath the mine is being. Although there is no text here or we can fill it with text. But in this text you again you escape. I and then start writing so you can you know go ahead and view this one and read this document make sure I see this is it. If you are using this command to always hit enter without entering this hedge did doesn't make any sense for the farmer. See if it is inviting more to the inviting more workers it makes sense if I use these comments head. G. Yo this makes moving sense entry. So the reason. Because you are in editing mode. You have to get out of this editing mode you get out of this editing mode. Hit escape and once you hit escape you are out of this anything more. Now this hedge makes difference here. This hedge no moves this. This game moves up. Right. Jay moves down you know moves like Right so that's how it is. OK. So you have to get out of this editing mode and do this you know movement enough commands. All right. Now we used to use to use this network OK. Now we'll just go this one. See what practicing is does the same thing would be good. Based on this last line first line now seems to undo all of the phone you have to bring the concept to home. I mean first line escape hatch comma shooter sorry it's escape uppercase hitch and escape law gets here to get you the mastermind. This is the last line of a senior right inside the last one. So bottom of the screen. OK I guess two more. Yeah. We have to work more on this. This is not easy. OK. No it's time escape G workout escape opportunity. It's supposed to go to your last line. Yes that's correct. So the fun here is Skip G. Yeah I mean that's the same thing you did four hours or so. This is the same thing a similar thing actually. So no let's go to escape for G. Let's say we want. This is here. Escape for G. D symptom we're coming. Makes sense. Nobody. One I want to do is go here and escape. MURRAY Right. What happened is it copied that line. Nothing makes her go here and escape spaced because just based on that life might exist in. So I used smart people using large P. So you're here right. Work based on my escape. To escape poverty speed it's to tell you that the Islamic State that. OK. So you know so based on bravery copies this is escapes right by our business section. Say I want to copy this name. Okay. This is why you write in your piece place below below this right below is so escaped on the and so we belong to you. I mean this is good. So if you're using uppercase B then it pays to be above the line of work is if you're using lowercase beats you know below them. So that's what it is. Okay. No let's try but Nix commands. Escape a. I guess it's warning actually a skip and it goes to mixed my okay. I'm sorry. Rules the course of the next character you skip the moves in. Well and then next to go to escape a path to c most to modify that even does brain yeah that escape. Everybody knows that. So this is few of the major commands. So again you want to start writing oh this game couldn't escape AI and start writing smaller where you need to Lucky me even the backspace is working here burning some of the Unix it doesn't work. So don't depend on this. You have to depend on escape and you need this whole life. All right. Deleting from base chief just keeps OK copy it. Why waste. Waste is being it just a moment of curse actually. Okay so OK. You can look into this and try it. OK. Yes. According to no one in this Scotty No no yeah except to always make sure escape. I know not doing such a delay. We did this video if you can. If you put a pocket lead that did end up daylight. Let's try that. Escape into the night so we delete. But keep the space. But if you me it's making the space too and the solutions together understand the difference here. So we want to make sure my space is like oh if you press want to skip this fine OK we can based out which is more. We won't have to put escaping believing what he wants in the name of and you have many options to save in Prime. Show me. I use Sue and quit. So what I do is a space corner. Then you enter it's not to get tested. It's yeah. OK. So that's how you want to see the V.A. Ed is a little complex here. You won't be used as a cheat sheet. I am not is 40 sheets here for you. Make sure each one is good for you. Which one it looks good. Try that three of OK. I put three of them so it makes easy for you OK. It doesn't make any easy. But yeah this is good. I can be a strong back to use de or do let's say I'm on a date with a escape who crush. So. In front of a copy my life and based on the motives here right before I went back to our base to do about so completely speed so no. If I'm basing it below so lowercase b you know you know you cannot remember all this. I mean you can't you can't. I am not saying that you cannot but for to start for a beginner. This is this would be this would be the tricky part because you want to use this to cheat on to understand what first thing first thing you can go through is movement commands go to make amends had Jiggy up in we can remember this character Hey Jake you and we try here in detail how this work. Jane Doe visa okay please I am in mill he is right which is left handed left it is right get down. He's OK all right. You know the winds of this should be good so once you know and jiggle Hitch is left. And so Jay is down he's up and he's right. And the rest. Let's hear them talk. Great. Okay. So which I remember is one of. Whole life. Beauty. Did you want to copy a line. Why write in one based in line if you are two faced about the line of practice. And if it weren't pasted below the line Lord this is this. Few of these commands and if you want your cursor to move in the home just shift page goes the hook and if you want MacArthur to last shift down right Marlon speed. And if you work your cursor move in the middle of the screen then shift in last minute of the screen. One day that kind of so x x values ticker symbol marker. Not only does Warren Buffett instruct space age don't believe you to X here but new to make sure you're in this game. Most people view you don't use unscrupulous reversal would be pitches top of the screen name is middle of the screen this is the lasting screen. This is so we tried this too right. Similar deals do not wish to move back a dollar in these moves yet so dollar moves the cursor in the last lane to levels you know first names rumor and dollar shift clear of the use ship and dollar voting of the last name deal that moves in the fast lane if a good deal then gets based. Again they want more space for your I.D. regardless of Bebe get lost in one day. Please baby so that's so full with solid information on V.A. detach Emacs is more complex you don't form a board there for an hour so that is for programming. So this is this will get start. Useful programming actually as soon as she can start writing your shows. Keep in mind as you know this V8. OK. And if you want to save notes escape death makes saves and excuse angry feelings for me dance because you find your inner strength. And if I want to escape. Cue confirmation. That means you don't save anything. You were never saved on God again. So that's how it is. That's how you exist to be a creator. Existing to be a terrorist and to be we're going sit here and continue going from Parish all it's very interesting you can you can work on this and dig it as a whole but work on invoking the DEA. If you've only then you can let me know and you can correct me here. Some of DADT here dating we are deleting a character we have offended a character deleted in your bonus copy. Yeah. Why why is copy civil could emerge from Clinton's so you can go ahead and view this on this book. This is more than Bernanke. If you want to quit escape call on X. If you want quit without thinking I will use this one. I mean can you use any of this kind of OK so this should help you out for and out for you. You know you need a different customer. You can still use this arrow key. It's not a big deal. But don't use that because some of the most hungry units are supporting this housekeeper. You want to use. OK so if I want to delete something like an escape fix. So let's say I'm trying all right. This is my final line. If you are a baby return I can go ahead and escape and find good believed DNA index that predicts baby you the moon can keep deleting the eggs by hitting eggs are a workable day. The online video online is gone got for one thing action worth is just too messy to alone. Interesting the details. OK so if you want kind of good cool and all the more the current line number Dr. Drew 18 is coming right. And if you want to know number of lines warmer that's the use of you can use call all night. There are many more commands on call us alone back. We won't do is ending tonight. Hello. Where to end that 22 number of lights. OK and so they day the. And I guess we'd stop here. I. I'm sure you have a lot of questions for me. You do. And if you find this document don't get disheartened because I see I see this quote on this. OK. I'm sure you would be having me lot of questions in me Ed.. Don't worry about it. You can either follow this cheat sheet which is simple. Are many of the two of them. Three of the match. Three of them. Go ahead I'm looking good OK. Whichever that looks good for you. You can follow that at the end. We. You have all these what we discussed. Although some of the comments we didn't use it because of it we need access and you still cannot use it. If you're using my hand on this access. All right. So I hope you know just tutorial was useful. Your homework will be to work more on the ED because Ed.. I didn't explain everything. We just meant the stuff that base Mr. Warner got said here and then here in this essay. But we really didn't. But still you can do a lot more things. So yeah. And is he here we have you can view without the editor of the record you can command catalog a zone boom duck DST you can see where we are among Monday spaces is also included so space is obsolete. So we will remove this space. Nobody thinks the movie is based in the age of the look good. Jake I see my G No I d meetings d d we the I use this until this one on something not goes off. S right. I want to say quick escaped Warren X we have a screen. And if you walk a view it tacked example that the X2 you can view. We don't view it as in just viewing. So I hope you found this tutorial to be useful. Should you be having a lot of patience and. Make sure you read about me. You can come back to me. Hopefully I'll be pointing you access it would be. I'm not voting on this document actually. So you know you can work on that. Do the homework because you know I'm not going to say anything new in your work on the ed. documented already there. Google is going to back me up a little bit understand and I guess that's it. That's how I feel about the issue shows off limits. So this was all a motivation tons of Phoenix a few of course. My accent might be an issue my speed might be an issue. I understand that keeping that in my mind. You better not. I'm giving you they're not mine. So that you've been looking at documents not just right. And the most important thing is giving you access. Don't misuse it. Use it responsibility if you are misusing it. Other people are getting affected. So you learn just you. Everyone is getting in now so don't misuse this acts of this access is very smart. I don't you can create your own axis. No big deal. You know how to it. On ahead and create. OK. Let me show you how to create that could we create an axis and Greeks are. I this fine tuning actually as opposed to responding because my show was not created actually. I'll go ahead and sign up for free show Unix and once you get you actually a computer for this part and you can go ahead and play it you can get to automatically e-mail or you or industry the temporary password is push to get the temporary password OK. OK. And you can create your award. Sure Michael. OK. So thank you home. Thank you for having so much patience for listening this Unix class. Hopefully you know we'll see if I have an access wheel to do this a mean thing I'm hinting is pretty tricky a lot of things should be known by creator shared scripting and managing the disputes age metering copying a lot of things. So we I don't think I'm doing this anytime soon. But let's see how many new jobs. OK. Thank you and good luck.