vim automatically executes the replacement command every time
巴扎黑
巴扎黑 2017-05-16 16:38:58
0
1
546

Every time you use vim to edit a file, a command similar to :1s/^./g/ will be automatically executed to automatically replace the first word of the first line.
Press http://vim.wikia.com/wiki/Troubleshooting and it’s still the same.
This problem will not occur if you use vi.
Attached .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
巴扎黑
巴扎黑

reply all(1)
滿天的星座

After searching for "vim 0000/0000/0000", I found that it is a bug in vim. It will be fine after upgrading.
http://stackoverflow.com/questions/31775203/vim-in-cygwin-replaces-fir...
Not only cygwin, Arch Linux also has the same bug.
https://bbs.archlinux.org/viewtopic.php?id=199362

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!