干掉文件末尾的^M ( remove trailing ^M characters )
访问量: 3184
Within vim, look at the file format — DOS or Unix:
方法1.
:set filetype=unix
:set fileformat=unix
The file will be written back without carriage return (CR, ^M) characters.
方法2。 (2025.11)
:e ++ff=dos | setl ff=unix | up