O'Reilly logo

Hacking Vim 7.2 by Kim Schulz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

X marks the spot

Sometimes when editing a line in a file, you have to go somewhere else in the file to look up something. Afterwards, it can be difficult to find the line you were editing, and you waste valuable time.

Wouldn't it be nice if you could mark the spot before leaving it, such that it is easy to find later?

Vim has some tools for you that can do just that. We can split it into two categories:

  • Visible markers
  • Hidden markers

In the following two sections, we will look at the possible ways of adding marks in Vim, and then it's up to you to figure out which one fits your needs the best.

Visible markers—using signs

In Vim, we have a nice feature for marking a line with a visible mark—signs. A sign is a mark that will show up in the leftmost column ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required