在檔案之間拉動時,VIM 僅儲存前 50 行

在檔案之間拉動時,VIM 僅儲存前 50 行

當我用來Y猛拉線條時,我可以猛拉任何合理數量的線條(我從來沒有故意達到限制)。但是,如果我關閉該文件,然後嘗試貼上p到另一個文件中,則只會貼上前 50 行。

我已確認僅在 中找到了文本的前 50 行~/.viminfo

如何增加要儲存的行數?谷歌搜尋“vimrc yanklines”等沒有返回任何相關結果。另外,我如何在精美的手冊中找到答案?透過搜尋“h viminfo”等我發現set history但增加數量並沒有幫助。

答案1

你的第一個問題的答案是:

set viminfo+=<100    " or whatever number you want

你的第二個問題的答案是:

未來你可以看看:help viminfo

'viminfo' 選項是一個字串,包含有關應儲存哪些資訊的信息,並包含應儲存多少資訊的限制(請參閱 'viminfo')。

從那裡,<C-]>on'viminfo':help 'viminfo'會直接帶您到文件的相關部分,您會在其中找到以下內容:

(Vi default: "", Vim default for MS-DOS, Windows and OS/2: '100,<50,s10,h,rA:,rB:,
                             for Amiga: '100,<50,s10,h,rdf0:,rdf1:,rdf2:
                             for others: '100,<50,s10,h)

和:

<    Maximum number of lines saved for each register.  If zero then
     registers are not saved.  When not included, all lines are
     saved.  '"' is the old name for this item.
     Also see the 's' item below: limit specified in Kbyte.

相關內容