[英]Error while using iab in vimrc
I need to convert 我需要转换
for(int
to for (int
for(int
至for (int
automatically in my vim editor. 自动在我的vim编辑器中。
So I have written following statement in my vimrc 所以我在vimrc中写了以下声明
iab for(int for (int
but its giving following error 但它给以下错误
line 158:
E474: Invalid argument
What is the reason for this error ?? 此错误的原因是什么?
Also How can I write a general statement which will convert 另外我怎么写一个将转换的一般声明
for(int to for (int
for(;; to for (;; etc...
There are 3 types of abbreviations: 缩写有3种:
'iskeyword'
characters. 'iskeyword'
字符。 'iskeyword'
character but all other characters are not keyword characters 'iskeyword'
字符结尾,但所有其他字符都不是关键字字符 (from the help :h abbreviations
, there are examples for each type in the help). (通过help
:h abbreviations
,帮助中有每种类型的示例)。
Neither of those types is for(int
. So this can't be used as an abbreviation. You could theoretically tweak the iskeyword
setting to make it valid, but that will most likely have other non-intended consequences that will do more harm than good. 这些类型都不是
for(int
。因此,不能将其用作缩写。理论上,您可以调整iskeyword
设置以使其有效,但这很可能会带来其他非预期的后果,弊大于利。
See the help :h 'iskeyword'
for an explanation what the keyword setting is for. 请参阅帮助
:h 'iskeyword'
以获取关键字设置的解释。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.