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)

You can detect a nbsp by using the "ga" normal mode command. (Navigate the cursor atop each space and type <g> <a>.)

--
Best,
Ben

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