sponsor Vim development Vim logo Vim Book Ad

last_edit_marker.vim : Keybind to quickly return to the last code you edited.

 script karma  Rating 0/0, Downloaded by 937  Comments, bugs, improvements  Vim wiki

created by
joey twiddle
 
script type
utility
 
description
Automatically adds a global mark whenever you leave Insert mode, so you can
easily return to text you were last working on, even if you have moved to a
different buffer!  I tend to need this after I have been navigating around
files to do some research.  This saves us from hitting Ctrl-O repeatedly!

It sets global marker Z so you can jump back with g'Z but this is also bound to
the C-Y key for convenience.

ISSUES: not all edits require Insert mode.  e.g. undo or 4r0
And leaving Insert mode is not always an edit (e.g. Insert mode on a
conqueterm, or i<Esc> aborted edit).
 
install details
drop in plugin/

Edit the script if you do not want to overwrite the C-Y keybind, or if you want to
use a different global marker than Z.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
last_edit_marker.vim 1.4 2012-10-24 6.0 joey twiddle Initial upload
ip used for rating: 142.132.191.50

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github