0

有时当在 Vim 编辑器中打开文件时(以传统方式:通过从命令行调用它,文件名作为参数传递),应用程序无法为它们创建相应的缓冲区并加载内容在这些缓冲区中。相反,它打开时仅加载了空的(新)文件缓冲区。

我观察到这种情况的发生与 Vim 从特定目录(不一定是正在打开的文件所在的目录)运行之间存在联系。只要我从那个目录运行 Vim,它就不会打开任何文件,即使它们位于不同的目录中。

我的用户的主目录就是这种情况,但不限于那个。有时,在没有明显原因的情况下简单地编辑目录中的某些文件后会出现故障。

我使用的插件:

  • 病原
  • MiniBufExplorer
  • 单编译
  • ctrlp
  • 书呆子树
  • vim 管道
  • vim 敏感的

你也可以看看我的.vimrc文件。

4

1 回答 1

1

This is likely caused by a misbehaving plugin.

Often, a binary search where you disable half of your plugins, then only one half of that (when the problem is still there), or the other half (when the problem vanished) lets you get to the problematic script quickly. The same can be done with the configuration in your ~/.vimrc (by commenting out blocks).

Also, you can capture a full log of a Vim session with vim -V20vimlog. After quitting Vim, examine the vimlog log file for suspect commands.

于 2014-12-17T08:00:33.783 回答