Learning the vi Editor

Learning the vi EditorSearch this book
Previous: 4.3 Making Use of Buffers Chapter 4
Beyond the Basics
Next: 4.5 Other Advanced Edits
 

4.4 Marking Your Place

During a vi session, you can mark your place in the file with an invisible "bookmark," perform edits elsewhere, then return to your marked place. In command mode:

mx

Marks current position with x (x can be any letter).

'x

(apostrophe) Moves cursor to first character of line marked by x.

`x

(backquote) Moves cursor to character marked by x.

``

(backquotes) Returns to exact position of previous mark or context after a move.

''

(apostrophes) Returns to the beginning of the line of the previous mark or context. Place markers are set only during the current vi session; they are not stored in the file.


Previous: 4.3 Making Use of Buffers Learning the vi EditorNext: 4.5 Other Advanced Edits
4.3 Making Use of Buffers Book Index4.5 Other Advanced Edits

The UNIX CD Bookshelf NavigationThe UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System