vim处理文件格式
设置文件编码为新编码
:set fileencoding=utf-8
又或者
:set fenc=utf-8
去掉utf-8 BOM
:set nobomb
保留utf-8 BOM
:set bomb
以16进制模式打开文件
:%!xxd
将以16进制格式打开的文件返回文本模式编辑
:%!xxd -r
:set fileencoding=utf-8
又或者
:set fenc=utf-8
:set nobomb
:set bomb
:%!xxd
:%!xxd -r