Make your mark

Making marks in Vim (and old vi) allow you to find particular places in your file without having to scroll or remember line numbers: just remember a letter. For example, typing ma will mark your current position with the a mark; you won’t see anything, but Vim will remember. Now move somewhere else in your file and type mb to mark it as b (or replace b with your favourite letter).

Once you have marked positions, you can jump to them: 'a will jump to the start of the line you marked with a and `b will jump to the exact position you marked with b.

Categorized as Uncategorized Tagged