How to search and replace an unprintable character

后端 未结 3 1307
遥遥无期
遥遥无期 2020-12-16 10:57

I\'ve a file that was exported from Word and it replaced all quotes with strange unicode characters which aren\'t correctly displayed in vim. So now I want those characters

3条回答
  •  一个人的身影
    2020-12-16 11:47

    you can also filter it by using the tr command

    for example replacing the hex a0 which stems from MacOs cut-and-paste can be replaced with a whitespace as follows (\240 being the octal representation of hex a0)

    :.,$!tr "\240" " "
    

提交回复
热议问题