How to jump cursor to specific line in visual mode in vi?

Viewed 2054

When I am using vi I will jump to a new line using :<line number>. And then when I try to highlight something, I will go to visual mode, and try the same command :<line number>. but instead of jumping to the line number that I asked, it does some weird behavior. How do I jump to a specific line while in visual mode?

3 Answers

In visual mode, you can type the line number you want to go to, then press shift + g to go there.

Related