尝试将set viminfo = n〜/ .vim / viminfo添加到〜/ .vimrc文件中.来自:help’viminfo’:
原文链接:https://www.f2er.com/bash/386371.htmln Name of the viminfo file. The name must immediately follow the 'n'. Must be the last one! If the "-i" argument was given when starting Vim,that file name overrides the one given here with 'viminfo'. Environment variables are expanded when opening the file,not when setting the option.