On Wed, Oct 17, 2007 at 12:50:14AM +0400, Alexei Alexandrov wrote:
> I have strange problems with setting up an insert-mode abbreviation 
> which starts with @ character. The following works fine:
> 
> :iab @a hello
> 
> and @a is expanded fine. But something that I really want like
> 
> :iab @pi @param[in]
> 
> says "E474: Invalid argument". Is there anything special about 
> abbreviations longer than 2 characters and starting with @ character?

As noted in the help for abbreviations

  There are three types of abbreviations:

  full-id   The "full-id" type consists entirely of keyword characters (letters
            and characters from 'iskeyword' option).  This is the most common
            abbreviation.

            Examples: "foo", "g3", "-1"

  end-id    The "end-id" type ends in a keyword character, but all the other
            characters are not keyword characters.

            Examples: "#i", "..f", "$/7"

  non-id    The "non-id" type ends in a non-keyword character, the other
            characters may be of any type, excluding space and tab.  {this type
            is not supported by Vi}

            Examples: "def#", "4/7$"

Per your examples, @p falls under the end-id category.  @pi doesn't fall
into any of those categories since the first character is a non-keyword
character and the rest are keyword characters.  pi@ on the other hand
would work.

James
-- 
GPG Key: 1024D/61326D40 2003-09-02 James Vega <[EMAIL PROTECTED]>

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui