How to move the cursor to a specific line in visual mode in vi?
When I use vi
, I will go to a new line using :<line number>
. And then when I try to highlight something, I go to visual mode and try the same command :<line number>
. but instead of jumping to the line number I was asking it does some weird behavior. How to navigate to a specific line in visual mode?
In visual mode, most movement commands work in the same way as in normal mode. In this case, you can enter <line_number>gg
or <line_number>G
.
nG
where n
is the line number.