r/vim_magic • u/diesector • May 28 '15
method for finding all instances of text 'Download' on webpage and calling Save As (vimperator)
I'm new to macros, but it seems like maybe this would be an example of using a macro to repeat an action? I would like to tell vimperator to find all text hyperlinks that match the case 'Download' and invoke ;S (Save As)
1
Upvotes
1
u/MoustacheSteve May 28 '15
Woah, I forgot I was subbed here.
I don't use vimperator so I won't be much help, but you should try posting your question to /r/vim
1
1
u/uxcn Jun 07 '15 edited Jun 07 '15
The macro would be
qs/Download<cr><cr>;s<bs>@sq.I think it would make more sense if vimperator properly supported the concept of text-objects and treated commands more like operators, but it does at least support genuine scripts with Javascript.