DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Editing files

Placing markers

A marker behaves like a bookmark; it saves your place in a file so that you can return to it from anywhere in the file. vi allows you to use up to 26 markers, named ``a'' through ``z''. To place a marker at the current cursor position, type m (for mark) followed by the letter that identifies it. To go to the place in a file where you have set a marker, enter a single back quote (`) followed by the marker's letter.

For example, you could type mh occasionally to keep your place in a very long file. If you then search for a piece of text elsewhere in the file, you might not be able to remember where you started the search. Enter `h and you return there immediately.

If you reload the file (using :rew or :rew!), or you load a different file, the markers are lost. Similarly, you lose a marker if you delete the line it was set on, and restore the line at a different place in the file.


Next topic: Using keyboard shortcuts
Previous topic: Using buffers to cut and paste text

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003