首页 > vim每次自动执行替换命令

vim每次自动执行替换命令

每次用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

经搜索"vim 0000/0000/0000", 发现是vim的一个bug, 升级后就好了.
http://stackoverflow.com/questions/31775203/vim-in-cygwin-replaces-fir...
不止cygwin, Arch Linux下也有相同的bug.
https://bbs.archlinux.org/viewtopic.php?id=199362

【热门文章】
【热门文章】