Remove BOM mark from files with VIM
Thu Mar 11 21:13:22 UTC 2010
Some evil editors add the BOM (Byte Order Mark) at the beginnig of the files you edit with them.
This sometimes may clash with other tools, like the famous Java tool Maven. If you received an error message doing a mvn compile you clearly need to remove the BOM from the affected files.
Thankfully my favourite editor, VIM, comes with an option to automatically remove the BOM from any file.
Instructions:
1) Open your file: vim Infected.java
2) Execute the magic command within VIM: :set nobomb
3) Save and be happy: :wq
Happy coding!
Keywords: bom, mark, vim, maven, nobomb