Advanced Editing Techniques

This section presents several commands that you may find useful once you have become comfortable using vim. While you are using vim, you can set and use markers to make addressing more convenient. Set a marker by giving the command mc, where c is any character. (Letters are preferred because some characters, such as a single quotation mark, have special meanings when used as markers.)

Optional

Using Markers

Once you have set a marker, you can use it in a manner similar to a line number. The vim editor does not preserve markers when you stop editing a file.

You can move the cursor to the beginning of a line that contains a marker by preceding the marker name with a single quotation mark. For example, to set marker ...

Get A Practical Guide to Red Hat® Linux® 8 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.