MCQ
Q.
The [line number G] key allows you
Correct Answer: D
The correct answer is The key combination '[line number]G' allows you to move the cursor to the beginning of the line specified by the number..
🔑 Key Points
- In many text editors, particularly Vim and Vi, the command 'nG' (where 'n' is a number) is used to navigate directly to a specific line.
- The cursor will be placed at the beginning of the specified line 'n'.
- If no number is provided (i.e., just 'G'), the cursor typically moves to the beginning of the last line of the file.
📄 Additional Information
- This type of line-number-based navigation is a fundamental feature in many command-line text editors and Integrated Development Environments (IDEs) for efficient code and document review. Other common navigation commands in Vim include 'gg' to go to the first line, 'H' for the top of the screen, 'M' for the middle, and 'L' for the bottom. This contrasts with basic cursor movement keys (left/right/up/down arrows or 'h', 'l', 'k', 'j' in Vim), which only move the cursor by a single position or line relative to its current location.