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?

+3


source to share


2 answers


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

.



+6


source


nG

where n

is the line number.



+3


source







All Articles