2

Possible Duplicate:
How do I convert dos files to linux files in vim?

I used to edit php programs in notepad++, today when i opened in VI editor.

Every line was appended with ^M character.

What is ^M character? that i don't see in notepad++ but in VI. Is this new line?

How to disable that in VI?

enter image description here

Community
  • 1
  • 1
P K
  • 9,972
  • 12
  • 53
  • 99
  • 2
    That's usually a sign that the file's been editted on a Windoze box and has been converted to msdos-style line endings. – Marc B Feb 13 '12 at 05:07
  • @Marc, How to get rid of this? – P K Feb 13 '12 at 05:09
  • 1
    There's probably a quicker way to do it, but I'm too lazy to look it up, usually I just got a search/replace: `:g/ctrl-vctrl-m/s///g` (ctrl-v and ctrl-m being actual keystrokes, and not c-t-r-l individual keys. – Marc B Feb 13 '12 at 05:10

0 Answers0