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

storing a macro with repeat#set() #26

Closed justinmk closed 9 years ago

justinmk commented 10 years ago

I'm trying to write a plugin that repeats a sequence (which happens to be a macro). But there seems to be an issue with sequences that contain a literal ^[ escape.

For example, if I want to repeat the sequence eab\<esc>, the following works correctly for the first . invocation:

call repeat#set("eab\<esc>")

But if I invoke . again, it now acts as ab\<esc>.

In all cases, echo g:repeat_sequence returns eab^[.

Thanks for your help.

justinmk commented 9 years ago

Fixed by https://github.com/tpope/vim-repeat/pull/39