![]() To move the cursor at the bottom of the file use the G command :G To move the cursor at the start of the file use the gg command :gg We can use the h,j,k,l key to move the cursor in the file but it will be difficult to move in big file vim provide more commands to move into the file. Then this will automatically go into insert mode then you can put anything in that line, This command will delete the contains from the cursor to the end of the line. To move the cursor 4 lines forward use the following command Here 2 is the number of counts and w is used for word To move courser 2 words forward use the following command 2w Here is a demonstration of the use of count and motion We can use motion with the d key and with many more keysĬount: Count is the number for which replete the motion for count number. $ - to the end of the line, INCLUDING the last character. Here is a list of some motions w - until the start of the next word, EXCLUDING its first character.Į - to the end of the current word, INCLUDING the last character. These execute the action in a particular way. Motion: Motions provide context to your Operators. O -> This key is used to puts the cursor above the line. O -> This key is used to put the cursor below the line. ![]() i -> This key is used to put the cursor before the current position.Ī -> This key is used to put the cursor after the current position. Just type the key into the normal mode in vim. There are Four keys used for the insertion of text. We have edited some text files before by using the i key. The character under the cursor will be deleted.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |