vim限制行内存 [英] vim limited line memory

查看:83
本文介绍了vim限制行内存的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

im试图将300行从一个文件复制到另一个文件,在源文件中,我键入"300yy",它说它已经拉了300行.

im trying to copy 300 lines from one file to another, in source file i type "300yy", it says it has yanked 300 lines.

转到目标文件,然后按p,它会粘贴,但只会粘贴前50行.

go to destination file and press p, it pastes, but only the first 50 lines.

知道为什么不粘贴300吗?

any idea why it isn't pasting the 300?

推荐答案

要在vim会话中查看当前设置,请运行:

To see the current settings during a vim session, run:

:set viminfo?

根据 Vim Tips Wiki 中的建议,您可以调整 viminfo 设置(同样,在vim会话期间)通过运行前命令:

As suggested in Vim Tips Wiki, you can adjust the viminfo setting (again, during a vim session) by running the ex-command:

:set viminfo='100,<1000,s100,h

,或者您可以删除:并将其在 .vimrc 中设置为默认值:

or you can remove the : and set it as default in your .vimrc as:

set viminfo='100,<1000,s100,h

各个部分的含义:

  • '100 会记住最近100个已编辑文件的标记.
  • < 1000 将每个寄存器保存的行数限制为1000行;如果寄存器包含1000行以上,则仅保存前1000行.
  • s100 包含超过100 KB文本的寄存器将被跳过.
  • h 在Vim启动时禁用搜索突出显示.
  • '100 Marks will be remembered for the last 100 edited files.
  • <1000 Limits the number of lines saved for each register to 1000 lines; if a register contains more than 1000 lines, only the first 1000 lines are saved.
  • s100 Registers with more than 100 KB of text are skipped.
  • h Disables search highlighting when Vim starts.

这篇关于vim限制行内存的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆