Go to first line in a file in vim? October 1, 2022 by Tarik In command mode (press Esc if you are not sure) you can use: gg, :1, 1G, or 1gg.