Replacing carriage return ^M with Enter

前端 未结 5 1451
一向
一向 2021-01-31 08:24

I know how to remove ^M in my files (%s/^M//g), but this one is just one line I\'d like to replace ^M with enter... what\'s the enter char

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-31 08:41

    In vim session try:

    :%s/^M//g
    

    Where ^M is achieved by ctrl+V+M keystrokes together.

提交回复
热议问题