To jump back to the first line of the file, you can use either one of the following commands: 1G Since these are Vim commands, make sure that you are in Normal mode (use Esc key) before pressing any keys. There are several ways you can jump to the first line in Vim. Shift and g key together) in Normal mode, and your cursor will move to the first character of the last line.Īnother way to jump to the end of a file is by using the Esc + Ctrl + End or ]] key combination. It does not matter which row or column you are in Vim, to move your cursor to the last line, simply press an uppercase G (i.e. Just like Apple's phrase "There's an app for that", in Vim, "There's a command for that". Use the Esc key to enter the command mode, and then use the above-mentioned keys. You need to be in normal mode (also known as command mode) to use these keyboard shortcuts. It is good to know how to move the cursor from anywhere in the file to either the first line or to the last line. If you open a very long file in Vim, it can get tough to navigate the file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |