How do I go to first line in a file in vim ?
Key in 1 + G and it will take you to the beginning of the file.
If we are in the vim editor, then simply do this, “Press the ENTER key, write the Line number, and press Shift+ g”: Again the output is the same.
Shift+I or ^ will move cursor to beginning of the text in the line.
Instead of that, you can also use the Esc + Ctrl + Home key combination to move your cursor to the first line of any file.
In command mode (press Esc if you are not sure) you can use:
Type "gg" in command mode. This brings the cursor to the first line.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With