vim每次自动执行替换命令

浏览:44日期:2023-08-03

问题描述

每次用vim编辑文件都会自动执行类似 :1s/^./g/ 的命令, 自动替换首行首字.按 http://vim.wikia.com/wiki/Troubleshooting 过了一遍还是一样.用vi就不会出现此问题.附 .vimrc:

syntax onfiletype indent plugin onset encoding=utf-8set fileencodings=utf-8,cp936,latin1set fileformat=unixset fileformats=unix,dosset numberset modelineset tabstop=8set expandtabset softtabstop=4set shiftwidth=4set backupset backupdir=~/backup

问题解答

回答1:

经搜索'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

相关文章: