How to jump to the exact last change point in Vim
Use `.
. That is, backtick followed by a dot.
As a change has a beginning and an end, `[
and `]
are also very helpful:
'[ `[ To the first character of the previously changed
or yanked text.
'] `] To the last character of the previously changed or
yanked text.
After executing an operator the Cursor is put at the beginning of the text
that was operated upon. After a put command ("p" or "P") the cursor is
sometimes placed at the first inserted line and sometimes on the last inserted
character. The four commands above put the cursor at either end. Example:
After yanking 10 lines you want to go to the last one of them: "10Y']". After
inserting several lines with the "p" command you want to jump to the lowest
inserted line: "p']". This also works for text that has been inserted.
I suggest a mapping to jump to the last changing point, as we have:
gv ................... repeats last selection
gi ................... enters insert at the last inserting point
" gl to jump to the last change "exactly"
nnoremap gl `.
Reference: https://twitter.com/dotvimrc/status/191163723065462786