On So, 06 Nov 2011, Bee wrote:
>
>
> On Nov 6, 9:14 pm, Christian Brabandt <cbli...@256bit.org> wrote:
> > Hi Tim!
> >
> > On So, 06 Nov 2011, Tim Chase wrote:
> >
> > > On 11/06/11 19:04, Quincy Bowers wrote:
> > > >Ah, I wonder if abbreviations can only be defined if they
> > > >don't cross keyword boundaries... And if that is the case is
> > > >that intended?
> >
> > > That's why I was confused that
> >
> > > :iab @a @author Author Name
> >
> > > worked, but
> >
> > > :iab @author @author Author Name
> >
> > > errored out.
> >
> > That is explained at :h abbreviation.
> >
> > ,----
> > | 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$"
> > `----
> >
> > So while @a is of type end-id @author isn't.
>
> :set isk?
> returns:
> iskeyword=@,48-57,_,192-255
>
> That means @ is a keyword character,
No.
:h 'isfname'
,----
| If the character is '@', all characters where isalpha() returns TRUE
| are included. Normally these are the characters a to z and A to Z,
| plus accented characters. To include '@' itself use "@-@". Examples:
`----
> it also means _ is a keyword character,
> and both the following SHOULD be full-id.
>
> This fails:
> :iab @author @author Author Name
As I said before, the @a is of type non-id, while @author isn't.
Do
:set isk+=@-@
and it works.
regards,
Christian
--
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
No comments:
Post a Comment