Three modes of VIM
General mode (switch to command mode press shift+: key combination, switch to insert mode press I or a key)
Insert mode (switch to edit mode press ESC)
Command mode (in general mode after typing the appropriate command by pressing the ENTER key)
Function
Display line number under Command mode (":" appears below the screen), type set nu! (You can add set nu! to/ETC/VIM/VIMRC to make vim display line numbers by default). Set nu! The effect of the switch, when Vim is in the display line number state, you can use its hidden line number; When Vim is in the display line number state, you can use it to display the line number.
move the cursor to the specified line number in command mode, type the number of lines
move the cursor to the file header or tail in general mode, type GG or GG to
display the current file name in general mode, press the key combination Ctrl+g
Vim Usage Summary