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

Support repetition with original register. #3

Closed inkarkat closed 12 years ago

inkarkat commented 12 years ago

For commands that take an optional register (like p/P), Vim uses the same register on repetition. This enhancement allows the same for custom mappings, which need to call repeat#setreg() before repeat#set(). (No changes for the vast majority of mappings that don't use registers.) It even supports repeat of the expression register, with the expression being re-evaluated on repeat.

inkarkat commented 12 years ago

I have been using this modifcation (in combination with #2) now for quite some time. If you want to see how these enhancements are used in practice, please have a look my UnconditionalPaste plugin in version 1.20.

tpope commented 12 years ago

Hi, sorry for letting these both hang for so long. Can this be merged independently of #2?

inkarkat commented 12 years ago

Can this be merged independently of #2?

I think it can, but I've always been using both together. (For many months now, without problems.)

tpope commented 12 years ago

I added some blank lines.