When I am editing source files using vim and other editors sometimes at the end of the line I get these ^M characters at the end of each line. I think that it has something to do with editing a file in windows and then in linux. How can I remove all of these automatically?
相关问题
- Is shmid returned by shmget() unique across proces
- Inheritance impossible in Windows Runtime Componen
- how to get running process information in java?
- Is TWebBrowser dependant on IE version?
- How can I have a python script safely exit itself?
I tend to run afflicted files through
fromdos
before reopening them.fromdos
is part of the tofrodos package.As a command, type
(To get ^M, press ^V ^M, where ^ is CTRL on most keyboards)
mcedit: shift+f2, set unix format (LF), ok