Vim - nobomb - 删除文件的BOM

 

Vim - nobomb - 删除文件的BOM

							*'bomb'* *'nobomb'*
'bomb' boolean (default off)
local to buffer
{not in Vi}
{only available when compiled with the |+multi_byte|
feature}
When writing a file and the following conditions are met, a BOM (Byte
Order Mark) is prepended to the file:
- this option is on
- the 'binary' option is off
- 'fileencoding' is "utf-8", "ucs-2", "ucs-4" or one of the little/big
endian variants.
Some applications use the BOM to recognize the encoding of the file.
Often used for UCS-2 files on MS-Windows. For other applications it
causes trouble, for example: "cat file1 file2" makes the BOM of file2
appear halfway the resulting file.
When Vim reads a file and 'fileencodings' starts with "ucs-bom", a
check for the presence of the BOM is done and 'bomb' set accordingly.
Unless 'binary' is set, it is removed from the first line, so that you
don't see it when editing. When you don't change the options, the BOM
will be restored when writing the file.

[Vim - nobomb - 文档]

http://vimdoc.sourceforge.net/htmldoc/options.html#%27nobomb%27

[vi - 官方网站]

http://www.vim.org/

[vi - 下载地址]

当前版本7.2, http://www.vim.org/download.php

[vi - 相关论坛]

http://vim.board.newsmth.net/

[vi - 相关关键词]

vi

[vi - 常用操作]

vi中使用dd命令删除一行, http://vimdoc.sourceforge.net/htmldoc/change.html#dd

编辑cygwin的Bash脚本, set fileformat=unix

删除文件的BOM, http://vimdoc.sourceforge.net/htmldoc/options.html#%27nobomb%27

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值