2013-04-17 21 views
4

當我繼續輸入<C-O>時,它只能跳回3-4個位置,然後再回到第一個位置。爲什麼我的跳轉列表不起作用?

下面是:jumps輸出時,我按壓<C-O>多次:

1。打開文件時:

: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。按下<C-O>

: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。當<C-O>再次按下時,輸出:jumps回到與第一步相同。


viminfo輸出爲:

viminfo='100,<50,s10,h 

爲什麼發生這種情況,如何解決?

+0

'>'在正確的位置,請參閱':h jumplist'。跳轉列表的默認長度是100,4確實很奇怪。 ':set viminfo'的輸出是什麼? – romainl

+0

@romainl更新了我的問題。 – Deqing

+0

具有相同的確切問題。加載'vim -u NONE'修復了這個問題,所以我的vimrc裏有一些東西搞砸了。不知道可能是什麼。 – Nacht

回答

0

對我來說,這個問題是由這些線在/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 

當切換到不同的文件,這將跳轉到開始閱讀模式行,增加了跳轉表。