[Vimperator] abbreviation (patch) [+RFC: text substitution]
Martin Stubenschrott
stubenschrott at gmx.net
Sun Nov 4 05:22:39 PST 2007
On Sun, Nov 04, 2007 at 10:08:49PM +1100, Doug Kearns wrote:
> :echo "Vimperator version is: " . v:version
OK, good, works ;)
> In this example, at least, it's easy enough to do:
>
> :abbr MS Martin Stubenshrott<S-Left><Left>
Right, never used <S-Left>, but ok.
> :iabbrev <expr> DATE "Today is: " . vimperator.system('date')
Hmm, also works, seems i just know too little about vim :)
<snip>
> :echo "#" works fine. There's no need to escape it, only a bare # is
> expanded.
Not totally right, only :echo expand("#") is expanded.
> > > <clink> could be the current 'link' like <cword>
sounds logical
> > Same problematic use of </> which will be input/output redirection.
>
> I don't see a problem here at all - just an implementation detail at
> worst.
I you are going to implement that, have fun ;)
> > > > To grep the current textContent of the website:
> > > > :!grep foo #{text}
> > >
> > > :!grep foo <text>
Again you probably mean :!grep foo <<text>
But we could also use "modifiers", like %:t which results in a local filename
with just text contents, %:l as a tmp file which is a copy of the html
page, or % as the full http:// url.
> > < is bad, since we want to have input redirection at some time.
>
> Again I don't see that as a problem but I'm not really convinced by
> <text> either. I think it would be better implemented as filtering
> with !
Elaborate on that please.
You really gave good points for "your" or the "vim" way, i am not fully
persuaded yet, as it seems much more complex to implement, and time is
short you know, but we'll see, it's a future item anyway.
--
Martin
More information about the Vimperator
mailing list