Vim “Done” map/macro
The following inside the .vimrc moves the selected line to the end of the file and takes the cursor back:
map <C-d> dGp''
From the first answer:
\`.command will bring you to your last change.
\`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 mark-motionsfor some more general info about using marks (including some other “special” marks that are automatically set).