Why is my jump list not working?

When I keep typing <CO> , it can only bounce back 3-4 positions and then go back to first place.

Here are the outputs :jumps when I press <CO> several times:

1. When opening a file:

 :jumps jump line col file/text 96 1 0 ~/works/WebContext.h 95 1 0 ~/works/WebProcessProxy.messages.in ... 3 1 0 ~/works/view_messages.h 2 1896 4 ~/works/view_messages.h 1 1 0 set viminfo='20,\"50 " read/write a .viminfo file, don't store more > 

2. Pressed <CO> :

 :jumps jump line col file/text 96 1 0 ~/works/WebContext.h 95 1 0 ~/works/WebProcessProxy.messages.in ... 3 59 4 ~/works/DOMWindowFileSystem.cpp 2 1 0 ~/.vimrc 1 115 44 ~/.vimrc > 0 1 0 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 1896 4 ViewHostMsg_DidCreateInstance, 

3. When you press <CO> again, the output :jumps returns to the same as the first step.


viminfo output:

 viminfo='100,<50,s10,h 

Why is this happening and how to fix it?

+4
source share
1 answer

In my case, the problem was caused by these lines in /usr/share/vim/vim74/ftplugin/ocaml.vim :

 " Get the modeline because folding depends on indentation let s:s = line2byte(line('.'))+col('.')-1 if search('^\s*(\*:o\?caml:') let s:modeline = getline(".") else let s:modeline = "" endif if s:s > 0 exe 'goto' s:s endif 

When switching to another file, this will go to the beginning to read by the model, adding to jumplist.

0
source

All Articles