On Sun, Mar 17, 2013 at 05:08:29AM -0700, Kana Natsuno wrote: > Especially, the "solution" posted in the discussion > > https://github.com/tpope/vim-repeat/issues/8#issuecomment-13951082 > > does not work with custom operators using repeat.vim.
While I do hope Vim will gain native support for repeating custom commands with `.`, I would like to point out that the posted solution, while hackish, indeed does work with custom operators, custom motions, and even in combination. I am close to releasing a plugin with 18 custom text objects and cursor motions for S-Expressions, and I have a satisfactory¹ implementation of repeatable operator-pending commands here: https://github.com/guns/vim-sexp/blob/90cc836e9c83d4b96c6c5e971febc33a5d73f7e7/plugin/sexp.vim#L103..L132 The motion mappings created by the above function work with both native operators and with the custom operators provided by two other plugins by Tim Pope: vim-surround and vim-commentary. I don't know offhand if Tim had to put in any extra work to make this possible, but I don't believe so. Sung Pae ¹ Not perfect. The `c` command is special cased for now and the final position of the cursor is sometimes different than with native operations, but I think both issues could be resolved with some ingenuity. -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
