2017-02-25 72 views
1

我正在玩vim寄存器。打开vim与谁会自动写入vim寄存器?

`vim -i NONE` 

我可以打开vim没有任何注册。然后我运行“:NERDTree”命令。此操作后,我可以看到这些寄存器:

enter image description here

现在我的问题是。为什么注册ho存在?什么存储在寄存器中?

+1

Nerdtree可能会在内部使用它们,然后将它们还原到原来的状态(空),而不会将它们恢复到非现有状态。只有vim的最新版本允许我们这样做。除此之外并不重要 –

回答

-1

你需要知道怎么玩:

-i {viminfo} The file "viminfo" is used instead of the default viminfo 
       file. If the name "NONE" is used (all uppercase), no viminfo 
       file is read or written, even if 'viminfo' is set or when 
       ":rv" or ":wv" are used. See also |viminfo-file|. 
       {not in Vi} 

这与登记无关。相反,vim会话不会使用viminfo来存储标记或保存命令的历史记录。

关于寄存器oh你会得到答案:help quote_alpha

4. Named registers "a to "z or "A to "Z     *quote_alpha* *quotea* 
Vim fills these registers only when you say so. Specify them as lowercase 
letters to replace their previous contents or as uppercase letters to append 
to their previous contents. When the '>' flag is present in 'cpoptions' then 
a line break is inserted before the appended text 
+0

这个*与'viminfo'有一些关系:它存储所有寄存器的内容。 – yolenoyer

+0

为什么downvoting的东西是正确的?穷人! – Sabrina

+0

对不起,如果我错了(请再读一遍我的最后一条评论),并很抱歉成为“可怜的人”的一部分,但看起来你的回答并没有提供任何关于OP的问题的有用信息。我只是想帮助别人。免费给其他“好人”上传你的A. – yolenoyer