最近在我的VI编辑器中出现了一些问题,每当我在VI编辑器中打开文件时,它都会用$p
字符添加/替换文件的开头字符。
这很烦人,我签入了.viminfo
和.vimrc
文件,但此字符不存在。以下是我的.vimrc
文件的内容
syntax on
set nobackup
set hidden
set hlsearch
set incsearch
if &diff
"colorscheme desert
highlight DiffAdd term=reverse cterm=bold ctermbg=green ctermfg=white
highlight DiffChange term=reverse cterm=bold ctermbg=cyan ctermfg=black
highlight DiffText term=reverse cterm=bold ctermbg=gray ctermfg=black
highlight DiffDelete term=reverse cterm=bold ctermbg=red ctermfg=black
endif
set completeopt=longest,menuone
下面是我的.viminfo
文件的内容。
# You may edit it if you're careful!
# Viminfo version
|1,4
# Value of 'encoding' when this file was written
*encoding=utf-8
# hlsearch on (H) or off (h):
~h
# Last Search Pattern:
~MSle0~/$p
# Last Substitute Search Pattern:
~MSle0&pick
# Last Substitute String:
$````
答案 0 :(得分:1)
如果仅在iTerm
中发生,您可以尝试将其卸载,然后安装它的较新版本。