Reply to message «Re: iab : why "i" inserts space ?», sent 14:41:49 19 January 2011, Wednesday by Jean-Francois:
There is another option: cite from vim help just before |:abbreviate-local| tag:
================================= map.txt =================================
You can even do more complicated things. For example, to consume the space
typed after an abbreviation: >
func Eatchar(pat)
let c = nr2char(getchar(0))
return (c =~ a:pat) ? '' : c
endfunc
iabbr <silent> if if ()<Left><C-R>=Eatchar('\s')<CR>
===========================================================================
By the way, it is better to use `inoreabbrev', not `iabbr'.
Original message:
> Thanks for your explanation, very clear
>
> So I imap <C-Space> to <C-]> because <C-]> is hard to do with my
> french mac keyboard
>
> Thanks for your help
signature.asc
Description: This is a digitally signed message part.
