philc / vimium

The hacker's browser.
https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb
MIT License
23.15k stars 2.48k forks source link

macros! #2230

Open varung opened 8 years ago

varung commented 8 years ago

Would it be possible to use "q" to record a macro, and invoke it, just like in vim?

a-b commented 7 years ago

There was a similar request https://github.com/philc/vimium/issues/910

But in general I would definitly vote for thi feature and give a usecase: I want to automate a search of some url (written and text) on the page, visually select it and open it in the same or a new tab.

smblott-github commented 7 years ago

Unfortunately, this is quite hard to implement. Because many things in Vimium happen asynchronously, we don't really know when one command ends, so we don't know when to launch the next one. Also, injecting keyevents into all of the different parts of the code base touched in your example, @a-b, would be a nightmare.

zetok commented 7 years ago

Still, macros are really helpful and speed things up. Even a buggy implementation would be nice to have. Especially considering that current extensions for ff are going to die a "natural" death (thanks mozilla) and vimium seems to be the only ray of hope (#2425) on the horizon.

Current ff extensions also have some bugs when it comes to macro support (e.g. https://github.com/vimperator/vimperator-labs/issues/588), but it's a lot better than having nothing at all.

3m4r5 commented 1 year ago

@smblott-github about the asynchronicity problem, can't you let the user decide on a specific amount of time (interval) to wait before every action?

Drowze commented 10 months ago

Perhaps make it possible to have each action only happen after a specific key is pressed (which would act as a "step to the next action").

Macros would be a fantastic addition!