On Tue, Jul 12, 2011 at 1:17 AM, Benjamin R. Haskell <[email protected]> wrote:
> On Tue, 12 Jul 2011, Nathan Neff wrote:
>
>> I've tried this:
>>
>> iabbrev <s #+begin_src groovy
>>
>> in my .vimrc, but it doesn't work, it gives "Invalid argument" when I
>> start vim.
>>
>> But, when I enter
>>
>> :iabbrev <s #+begin_src groovy
>>
>> on the command line, the abbreviation works.
>>
>> What am I doing wrong?
>
> Check for non-breaking spaces.  I can get the "Invalid argument" error with
> the following line:
>
> iabbrev <s #+begin_src groovy
>       │  │           └─ regular space:       < > 32, Hex 20, Octal 040
>       │  └───────────── non-breaking space:  < > 160, Hex 00a0, Octal 240
>       └──────────────── regular space
>
> You can enter a nbsp by typing, in insert mode:
> <C-v> <x> <a> <0>
> (ctrl-v, x, a, zero)


I've checked for non breaking spaces, and couldn't find any.

Interestingly, if I use:

iabbrev <lt>s whatever

it works.

If I use

iabbrev <lt>sg whatever

then it fails with "Invalid argument".  It looks like vim trips up if
the abbreviation is > 2 chars if I'm using the <lt>

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

Reply via email to