Reputation: 629
How can I record multiple actions to later be performed with a single dot?
example arrange the line bellow to the default indent: J
if I now go down one line and press dot it only performs the
Thanks
Upvotes: 0
Views: 317
Reputation: 195079
if you want to bring the .(dot)
repeat features on your own plugin/functions, you can check this plugin: https://github.com/tpope/vim-repeat
Another possibility for repeating multiple operations/commands is defining or recording a macro, and replay it. Read :h q
for details.
For your example, you can record:
qqJjq
Then @q
to replay, also once you have replayed it, you can press @@
to replay previous macro.
Upvotes: 2