根据提示看文档即可:
Perhaps the problem is that the viminfo file..
- doesn't exist
- is invalid
- is empty
- can't be read (check permissions)
I suggest the following steps:
1) Create a new directory:
$ mkdir -p ~/.vim/files/info
2) Put this into your vimrc:
set viminfo='100,n$HOME/.vim/files/info/viminfo
完成两步后,退出vim重新打开VIIM,问题解决。
中间遇到了linux新手常踩的坑,不注意大小写。
要注意放入vimrc一句代码的大小写,因为将HOME写成小写,花了不少时间来找问题。
网友评论