How to go to line number in vim - terminal / server

June 10, 2012    vim vim line number

In addition to my last post which was how to show line numbers in Vim I soon after wanted to find a way to jump to the line number I knew I needed to edit.

Using a combination of grep -n "blah blah" file.txt which will return the string if found and the line numbers that it was found on.

Armed with the line number from grep I soon found a way to jump to line number in vim.

Simply do the following.

:956 + enter (obviously replacing 956 with whatever your line number is)

And that's all there is to it.

You can jump to the beginning and end of files as well by simply Hitting G.

blog comments powered by Disqus