On 06/11/11 23:51, Quincy Bowers wrote:
I would like to create an abbreviation like the following:
:iabbrev @author @author Author Name
But when I attempt this I get the error 'E474: Invalid argument'.
This works fine though:
:iabbrev @ @author Author Name
Can anyone tell me the right way to write this abbreviation command
without changing the left hand side to something other than @author?
Thanks,
Quincy
There are three kinds of abbreviations, see :help abbreviations
- full-id
the {lhs} consists of keyword characters only
- end-id
the last character, but none of the others, is a keyword char.
- non-id
the last character is not a keyword char, the rest can be anything
except whitespace.
@ is non-id
@a is end-id
@au or @aut or @author are not valid abbreviations.
(letters, but not @, are keyword characters).
Conclusion:
:abbrev @author {rhs}
is invalid for any value of {rhs}. The answer to your question is: you
can't.
Best regards,
Tony.
--
hundred-and-one symptoms of being an internet addict:
212. Your Internet group window has more icons than your Accessories window.
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php