Matt Wozniski wrote:
On Wed, Jan 6, 2010 at 8:10 PM, Tim Chase wrote:
Brian Golding wrote:
Is it possible to abbreviate multiple words.   For example to enter a
command such as

ab "by using" using

so that anytime the words "by using" are entered, they will be
replaced by just "using"?

 :inoremap by<space>using using

Speaking of horrible hacks, I think this one is conceptually worse,
but it doesn't have most of the drawbacks of using a map.

  iabbr <expr> using (search('by\_s*using\%#', 'bcW') == 0 ? "using" :
"\<Esc>bcwusing\<Esc>ls")

<shudders>
Like obfuscated C contests, that mapping is art, but a bit impenetrable like modern art. :)

-tim


-- 
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php

Reply via email to