On Tue, Oct 24, 2006 at 07:03:37PM -0700, Hari Krishna Dara wrote: > > I am facing a weird problem with the '' marker not getting set. Here is > what I am doing, but this may be more generic than what I do, but this > scenario is the most I use: > > - While on an identifier, use ^W^] to jump to the id definition. > - Mark the line, say, ma > - move a few lines up using k, say kkk > - yank the range using y'a > - Try to go back to the original position using '' > > Instead of cursor going back to the original line, it goes to the start > of the file. This behavior is really irritating, as I end up doing this > sequence repeatedly and it surprises me everytime. I have a feeling that > this wasn't happening in prior versions. Is there a flag that that I > might have changed?
I think it will work the way you want if you stay within the same file. Looking quickly, I do not see it stated explicitly, but I think all of the "other" maps are local to the file (or maybe buffer), like 'a to 'z . Only 'A to 'Z and '0 to '9 move between files. In particular, '' will jump to the '' mark in the current file. You can use <C-O> or <C-T> to jump back to your previous position. To reproduce: :help '' Then follow the links to :keepjumps (in the same file) or restore-position (different file) and try '' or <C-O> in either case. HTH --Benji Fisher