简体   繁体   中英

set nobomb not removing byte order mark in vim

I want to remove \\xef\\xbb\\xbf marks (BOM) from my file. It's a text file to be fed to python, and the BOM marks are causing problems there. I tried :set nobomb but those are still there. How can I solve this problem and what might have caused this problem?

UPDATE: My file is obtained by combining (concatenating) many other files (using obabel software) each of which has BOM. So, probably set nobomb removes BOM mark only at the beginning of the new file. In such cases, how can I remove all BOMs?

If the byte sequences are embedded in your buffer, a

:%substitute/\%ufeff//g

might already do the trick.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM