Forrest logo
back to the G tool

less:tldr:0f8c9

less: Go to end / start of file.
$ G (end), g (start)
try on your machine

The command "G (end), g (start)" refers to two different commands in the Vim text editor.

  1. "G" command: It is a capital letter that represents the "Go to" command in Vim. When you press the "G" key in Vim, it allows you to navigate to a specific line in the file. By default, if you simply press "G" without specifying a line number, it will take you to the last line of the file. However, you can also combine "G" with a number to go to the specified line. For example, pressing "5G" will take you to the 5th line of the file.

  2. "g" command: It is a lowercase letter that serves as a prefix for various navigation commands in Vim. When you press "g" followed by another key, it activates a specific functionality. One of the common usages of "g" is to go to the start of a file. Pressing "gg" (double "g") takes the cursor to the first line of the file.

To summarize, "G" (capital) is used to jump to a specific line (defaulting to the last line), while "g" (lowercase) is used as a prefix for various navigation commands, such as going to the start of the file with "gg".

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the G tool