- 有時候常會在Vim 開啟檔案後碰到 ^M 這個字眼.
- 原因就是因為之前是dos 下編輯的檔案, 而vim 是用unix 開啟檔案, 所以他不認得dos的換行字元. 以下就是解決方式:
- Convert from dos/unix to unix
來源: http://vim.wikia.com/wiki/File_format
清除字尾空白
:%s/\s\+$//
來源: http://vim.wikia.com/wiki/Remove_unwanted_spaces
來源: http://vim.wikia.com/wiki/File_format
:%s/\s\+$//
來源: http://vim.wikia.com/wiki/Remove_unwanted_spaces
沒有留言:
張貼留言