Sunday, December 25, 2011

Abbreviations that depend on the following character

It would be nice to be able to type, say "l bon grain" for "le
bon grain" and yet type "l'ivraie" without having it expand to
"le'ivraie".

A non-id abbreviation for "l'" like
:inoreab l le
:inoreab l' l'
doesn't work. Not after white space anyway. (Even though the doc
says "in front of the match is a space, tab or the start of the
line or the insertion".)

A mapping for "l'"
:inoreab l le
:inoremap l' l'
seems to work, as long as you type fast enough.

Is there a way that doesn't require two abbreviations/mappings ?
Like a notional "inoreab l [^'] le" ?

Thanks in advance.

--
André Majorel http://www.teaser.fr/~amajorel/
Subliminal message : Vim needs arbitrary tab stops.

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