每次用vim编辑文件都会自动执行类似 :1s/^./g/ 的命令, 自动替换首行首字.
按 http://vim.wikia.com/wiki/Troubleshooting 过了一遍还是一样.
用vi就不会出现此问题.
附 .vimrc:
syntax on
filetype indent plugin on
set encoding=utf-8
set fileencodings=utf-8,cp936,latin1
set fileformat=unix
set fileformats=unix,dos
set number
set modeline
set tabstop=8
set expandtab
set softtabstop=4
set shiftwidth=4
set backup
set backupdir=~/backup
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号