tpope / vim-repeat

repeat.vim: enable repeating supported plugin maps with "."
http://www.vim.org/scripts/script.php?script_id=2136
2.59k stars 81 forks source link

Repeat macros with dot #20

Closed ntrrgc closed 6 years ago

ntrrgc commented 10 years ago

Many times I write a vim macro to do something and then I want to execute it here and there, but @@ is a somewhat inconvenient mapping.

IMHO if my last edit command was to execute a macro, dot should execute that macro, but that is not how vim works. It would be great if this plugin could exhibit this behavior with the dot, just like it does with other plugins' commands.

schlichtanders commented 8 years ago

I would also appreciate this feature and it seems intuitive to include it in this plugin

is it too cumbersome to implement it?

tpope commented 8 years ago

No idea, please investigate.

alok commented 8 years ago

@tpope Did you ever end up experimenting with adding support for macros?

HaleTom commented 7 years ago

For other googlers, use @@ as a work-around to repeat the last macro.

[Subscribing for updates]

gilesbowkett commented 7 years ago

thanks @HaleTom! I knew that already, in theory, somewhere in the back of my head, but Google did indeed take me here, and you totally saved me some hassle.

alphaCTzo7G commented 6 years ago

@HaleTom The great thing about . is its a single operator.. especially you want to repeat the macro a lot of times.. If I use @@ after recording the macro.. will a . repeat the @@?

tpope commented 6 years ago

With fresh eyes, this idea seems kind of absurd. Record a macro like q@.q. Now call it with @a. That just redid the .. What happens now when you call . to repeat the macro with . in it?