vim 删除文件后的^m_Vim从文件中删除“ ^ M”返回

vim 删除文件后的^m

When editing some files fro Windows in vim, there are some ugly “^M” returns. Here is a method to remove and replace these “^M”s (please note that you should not copy/past to use the follows):

在vim中通过Windows编辑某些文件时 ,会有一些难看的“ ^ M”返回。 这是删除和替换这些“ ^ M”的方法(请注意,您不应复制/粘贴以下内容):

:1,$s/{Ctrl+V}{Ctrl+M}//{Enter}

{Ctrl+V} means keyboard operation that is push ‘ctrl’ and ‘v’ together. {Enter} is push ‘enter’.

{Ctrl + V}表示将“ ctrl”和“ v”同时按下的键盘操作。 {Enter}是按“ enter”键。

: means that it is a ex command.

:表示这是一个ex 命令

1,$ means that the line number range is from the first line to the last line.

1,$表示行号范围是从第一行到最后一行。

{Ctrl+V}{Ctrl+M} is the “^M”. {Ctrl+V} tells the vim to treat the next character as regular character.

{Ctrl + V} {Ctrl + M}是“ ^ M”。 {Ctrl + V}告诉vim将下一个字符视为常规字符。

翻译自: https://www.systutorials.com/vim-remove-m-returns-from-files/

vim 删除文件后的^m

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值