I often make changes to the middle of a big file, use gg to jump to the top to check something, and then realize I forgot to set a mark where I was editing. Is there a built-in way to jump to the location of the last-changed line?
How do I jump to the location of my last edit?
cursor movement;command history
The `. command will bring you to your last change.The ` goes to a mark, and . is a special mark which is automatically set to the position where the last change was made. See :help `. for some more information.There is also `` which will bring you back to where the cursor was before you made your last jump. See :help `` for more information.Another useful mark is `^; this is the position where the cursor was the last time when insert mode was stopped. See :help `^.See :help mark-motions for some more general info about using marks (including some other special marks that are automatically set).