> You can check out Kana's ctxabbr plugin (actually an autoload script):http://vim.sf.net/scripts/script.php?script_id=2514
>
> The script serves a slightly different purpose, but the following works
> for me:
>
> :call ctxabbr#define('using', "\<C-W>using", '<by')
>
> This defines a "context sensitive" abbreviation. It works like
>
> :inoreabbrev using <C-W>using
>
> but expands only when "by" is found to the left.
>
Very nice solution! Shouldn't there be two \<C-W> commands, though, to
also remove the word "by"?
No comments:
Post a Comment