Sunday, November 6, 2011

Re: Abbreviation with an @

On 07/11/11 06:37, 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.
>>
>> regards,
>> Christian
>
> :set isk?
> returns:
> iskeyword=@,48-57,_,192-255
>
> That means @ is a keyword character,
> it also means _ is a keyword character,
> and both the following SHOULD be full-id.
>
> This fails:
> :iab @author @author Author Name
>
> But this seems to be ok:
> :iab _author @author Author Name
>
> -Bill
>

In the value of 'iskeyword' (whose explanation resends to 'isfname'), @
doesn't mean @, it means A-Za-z (plus maybe á, é, etc.). To make the @
character a keyword character, use @-@


Best regards,
Tony.
--
This test has been designed to evaluate reactions of management
personal to various situations.

You are making a sales presentation to a group of corporate executives
in the plushest office you've ever seen. The enchillada casserole and
egg salad sandwich you had for lunch react, creating severe pressure.
Your sphincter loses control and you break wind, causing the glass
bookcase doors to shatter and a secretary to pass out.

YOU SHOULD:

(a) Offer to come back next week when the smell has gone away.
(b) Point to the Chief Executive and accuse him of the offense.
(c) Challenge anyone in the room to do better.

--
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: