I. Overview
The basic cursor movement commands in VI are: H, J, K, L.
Where h moves the cursor 1 bits to the left, J moves the cursor down 1 lines, K moves the cursor up 1 lines, and L moves the cursor to the right 1 bits.
The above command supports the "number + command" format and moves multiple bits (lines) 1 times.
Ii. examples
Initial state
01234
0123
012
Run command: l
01234
0123
012
Run command: 3l
01234
0123
012
Run command: J ( Note: The 1th line is more than line 2nd, run the J command, the cursor moves to the last 1 bits of the next 1 lines )
01234
0123
012
Run command: K ( Note: The 1th row is more than line 2nd, run the K command, the cursor moves to the previous 1 lines before the J command position, in this case 4)
01234
0123
012
Run command: 2j
01234
0123
2
Run command: H
01234
0123
012
VI One of the cursor movement commands