DISQUS

Tech-Recipes: Move or jump to specific lines in vi | UNIX | Tech-Recipes

  • Anonymous · 5 years ago
    This can also be done using the ex facility of vi: simply type ":" (to get the ex prompt), then the line number, then return; ":0" goes to the first line; ":$" goes to the last. More keystrokes, but it syncs well with things like ":0,$s/foo/bar/g".
  • anon · 8 months ago
    This doesnt work.
  • mgumgu · 2 months ago
    Thanks for the very helpful info! Though i noticed that when i type 0G i still jump to the end of the file. But to go to the beginning i need to type 1G instead. Thought i should share. Cheers!