vim E213: Cannot convert (add ! to write without conversion)

vivado 工程修改芯片型号 vivado工程芯片与实际板子不匹配时,需要修改工程的芯片型号,并对原工程的ip进行同步更新,之后生成新的bit文件,烧录到板子中 阅读详情
Subject:Re: vim 6.2 - encodings
From:Antoine J. Mechelynck (anto@belgacom.net)
Date:May 28, 2004 11:37:56 am
List:com.googlegroups.vim_use

ji@altern.org wrote:

Hi there,

I'm playing around with encodings in gvim62 (on winxp). Based on thescript set_utf8.vim by Antoine athttp://vim.sourceforge.net/scripts/script.php?script_id=789, I'veadded the following lines to my _vimrc :

if &termencoding == ""

 let &termencoding = &encoding

endif

if exists("+printencoding") && (&printencoding == "")

  let &printencoding = &encoding

endif

set fileencodings-=ucs-bom

set fileencodings-=utf-8

if (&fileencodings == "") && (&encoding != "utf-8")

 let &fileencodings = &encoding

endif

set fileencodings^=ucs-bom,utf-8

set encoding=utf-8

setglobal fileencoding=utf-8

setglobal bomb

Here's my problem :

o create a new file (which by default is utf-8 encoded)

o close this fileo reopen the file (fileencoding is recognised as utf-8)

o :set fenc=ucs-bom

o :w

o I got error E213: Cannot convert (add ! to write withoutconversion)

What am I doing wrong ?

Thanks in advance.

Cheers /jerome

1) "ucs-bom" is not a real encoding. it is not valid in 'fileencoding'(singular), but it is valid in 'fileencodings' (plural), to tell (g)vim torecognise all Unicode encodings when a "byte-order-mark" is present at thebeginning. (The byte-order-mark is code point U+FEFF "zero-width no-breakspace", which is represented by a different byte sequence in each of thevarious Unicode encodings, and each of whose representations is illegal inall Unicode encodings other than its own, with the exception that the BOMfor UCS-4le is equivalent to the sequence <FEFF><0000> in UCS-2le, so itmust be "assumed" that a file in UCS-2le will not have a null as its first"real" character.

2) If what you want to do is set a BOM at the head of your UTF-8 file, youshould have nothing to do ("setglobal bomb" takes care of that). To makesure of whether it is there or not, use ":setlocal bomb?" (without thequotes, but with the question mark). Vim should answer either " bomb" or"nobomb".

3) To place or remove a BOM on *any* Unicode file, set or unset 'bomb'(respectively).

See :help 'fileencoding' :help 'fileencodings' :help 'bomb'

HTH,Tony.

从零开始:手把手教你检查并更新英伟达GPU驱动和CUDA版本(Windows/Linux双平台) 本文详细指导如何在Windows和Linux系统上检查并更新英伟达GPU驱动和CUDA版本,解决版本不匹配导致的常见问题。涵盖驱动更新、CUDA Toolkit安装、版本冲突排解及性能优化技巧,帮助开发者高效管理GPU计算环境。 阅读详情

相关推荐

c++多线程(1)------创建和管理线程td::thread

std::thread 是 C++11 标准库中用于创建和管理线程的核心类,定义在 <thread> 头文件中。它使得多线程编程变得简单、类型安全且跨平台。

jndingxin的专栏 612

vim 写入错误,转换失败 (请将 'fenc' 置空以强制执行)

转载:http://forum.ubuntu.org.cn/viewtopic.php?p=2498184 代码: set fenc= 就好了. 参考: 引用: vim里面的编码主要跟三个参数有关:enc(encoding), fenc(fileencoding)和fencs(fileencodings) 其中fenc是当前文件的编码,也就是说,一个在

学习的专栏 8337

手把手教你学SOC芯片架构--NoC(片上网络,Network on Chip)全方位解析

​、​。

MHD0815的博客 822

vim Linux environment cannot add words for spell check

:set spell   add the word to vim spell check with "zg" please make sure that $ mkdir -p ~/.vim/spell

jerry_zjunwei的专栏 568

MalformedByteSequenceException: Invalid byte 1 of 1-byte

修改了线上程序的xml配置文件,重启后报如下错误: MalformedByteSequenceException: Invalid byte 1 of 1-byte 百度了下大体的意思是说文件的编码错误,需要重新设置一下文件的编码格式. vim打开配置文件,执行命令: :set encoding=utf-8 保存的时候又报错: 写入错误,转换失败 (请将 'fen...

weixin_30555753的博客 344

cannot convert ‘int*’ to ‘const size_t*(mxCreateNumericArray程序错误及解决方案)

binaryVP_NN.cpp:274:62: error: cannot convert ‘int*’ to ‘const size_t* {aka const long unsigned int*}’ for argument ‘2’ to ‘mxArray* mxCreateNumericArray(size_t, const size_t*, mxClassID, mxComplexit...

yizhang_ml的博客 1万+

CentOS用vim保存时提示: E121无法打开并写入文件

原因:无写入权限。方法一: 保存的时候用:w !sudo tee %方法二:修改所在文件夹权限:            chmod g+wr myeasytrader(这个为文件夹名字)            chmod o+wr myeasytrader(这个为文件夹名字)方法三:切换到root用户编辑        我用了第二种方法。...

alongwilliam的专栏 7124

vim

对于使用vim的程序员来说,shiftwidth,tabstop,softtabstop绝对是经常接触的三个缩进因素。能否有方便美观的,整体化的缩进,主要是由他们相互间的配合决定。在经过一段时间试用后,总结一下我的设置经验。 1 shiftwidth: 这个是用于程序中自动缩进所使用的空白长度指示的。一般来说为了保持程序的美观,和下面的参数最好一致。同时它也是符号移位长度的制定者。

sxtobj的专栏 263

vim常用命令

vim

andyLyysh的博客 722

linux .bash_profile 不能写入 转换失败

今天虚拟机上装informix 写".bash_profile"文件后保存提示:".bash_profile" 不能写入 -- 转换失败用户root 退出查看文件权限,有权限,退出.bahs_profile后重新进,又能写了。郁闷中百度一下网上有说:s -a $HOME看一下目录下是否有个.bash_porfile.swap的文件,有的时候因为操作失误或者系统出错可能会没有删除这个中间文件,手工删掉就可以了。看了一下没有swap文件,不过还是记录一下吧。

吴家应的专栏 5197

cannot convert 'const 类名' to '类名*'

发生这种情况应该考虑(类名*)为指针,它是一个地址。取出地址的值应该使用取地址符&。 同时应该类名前加上const

qq_36284984的博客 7250

E513: write error, conversion failed (make 'fenc' empty to override)"解决办法

<br /> 今天在FreeBSD上调试代码时,突然我的jar出现了这个错误!上网找了好多资料没有找到解决的办法,后来问同事才解决 了这个问题!(*^__^*) 嘻嘻……<br /> <br />  问题:E513: write error, conversion failed (make 'fenc' empty to override)"<br />  原因:新建的文件编码有问题。<br />  解决办法:<br />    先查看一下当前的编码:<br />       :set fenc?<br /

1万+

cannot convert (type interface {}) to type int: need type assertion

                问题:  在使用interface表示任何类型时,如果要将interface转为某一类型,直接强制转换是不行的,例如: var t interface{} = "abc" s := string(t) 1 2 3 4 cannot convert t(type interface {}) to type string: need type ass...

u010412301的博客 7269

vim保存时报错:E382: Cannot write, 'buftype' option is set

解决方法: 可用下面的命名查看buftype的设置,当buftype=nofile时,不能保存文件,只有当buftype=空时,才可以保存 :verbose set buftype   vim切换至ex模式,输入 {CSDN:CODE::setlocal buftype=}

xuemeilu的博客 3万+

cannot convert parameter 1 from 'int' to 'int []'

上述代码在编译时会出现  error C2664: 'InsertSort' : cannot convert parameter 1 from 'int' to 'int []' 这是因为用数组名做函数实参时,向形参(数组名或指针变量)传递的是数组首元素地址,因此对参数的类型做一下改变,如下图所示:

学如不及,犹恐失之 3万+

audit基本设置

audit基本设置 平台:10gR2: 1.开启审计: alter system set audit_sys_operations=truescope=spfile; alter system set audit_trail=db_extended scope=spfile; 重启database 2.基本概念 审计3个级别: a) statement语句审计 查询:DBA_

sxtobj的专栏 3242

关于编译报错 error: cannot convert ‘const std::__cxx11::basic_string‘ to ‘const char*‘ 的处理

所以然 目前c++11标准开始普及,大家都开始默认支持或者使用c++11,例如GCC 5就开始默认启用C++11特性。但是由于c++11相对于c++03,很多实现的数据结构都发生了改变,所以两者并不能完全混用。 默认情况下,GCC 5在编译时会将std::string类型按c++11下std::__cxx11::basic_string 来处理,这时如果你调用的库在编译时未启用c++11特性则其中...

努力努力努力 1万+

linux守护进程及其创建

1.什么是守护进程: 在linux或者unix操作系统中在系统引导的时候会开启很多服务,这些服务就叫做守护进程。为了增加灵活性,root可以选择系统开启的模式,这些模式叫做运行级别,每一种运行级别以一定的方式配置系统。   守护进程是脱离于终端并且在后台运行的进程。守护进程脱离于终端是为了避免进程在执行过程中的信息在任何终端上显示并且进程也不会被任何终端所产生的终端信息所打断。   守护进程

sxtobj的专栏 659

终端模式设定选项

 本文基址: http://blog.csdn.net/cugxueyu/archive/2007/12/13/1932964.aspx终端模式设定选项/* Note:termios是在POSIX规范中定义的标准接口。 * 终端模式的设定选项说明。 * Author:xueyu */                              1、"输入模

roker 1601

FML32 API

FML32 API 索引:1.概述 2.域表文件 3.域头文件 4.mkfldhdr(32)工具 5.环境变量 6.Falloc(Falloc32) 7.Fsizeof(Fsizeof32) 8.Fneeded(Fneeded32) 9.Finit(Finit32) 10.Fadd(Fadd32) 11.Fchg(Fchg32) 12.Fget(Fget32) 13.

sxtobj的专栏 6440

ANSI ESD S541-2019包装材料【中文版参考】.pdf

ANSI ESD S541-2019包装材料【中文版参考】.pdf

2024嵌入式大厂面经君正面试题

2024嵌入式大厂面经君正面试题提取方式是百度网盘分享地址

上一篇: xorg-x11-drv-vmware
下一篇: Linux命令学习手册-tty命令
sxtobj
博客等级 码龄15年 4粉丝 2原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值