Reputation: 1088
I need to convert
for(int
to for (int
automatically in my vim editor.
So I have written following statement in my 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...
Upvotes: 0
Views: 187
Reputation: 8248
There are 3 types of abbreviations:
'iskeyword'
characters.'iskeyword'
character but all other characters are not keyword characters(from the help :h abbreviations
, there are examples for each type in the help).
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.
See the help :h 'iskeyword'
for an explanation what the keyword setting is for.
Upvotes: 5