The tpope/vim-repeat
plugin requires other plugins to support it by calling repeat#set
, which auto-pairs-gentle does not.
Also, the plugin maps keys to <C-r>=…<cr>
sequences in order to perform its actions. Some of those sequences involve moving the cursor (with Left or Right) or pressing Esc. Insert mode repeat cannot handle these in the way you expect because
The following keys are special. They stop the current insert, do something,
and then restart insertion. This means you can do something without getting
out of Insert mode. This is very handy if you prefer to use the Insert mode
all the time, just like editors that don't have a separate Normal mode. You
may also want to set the 'backspace' option to "indent,eol,start" and set the
'insertmode' option. You can use CTRL-O if you want to map a function key to
a command.
(from :help ins-special-special
) includes arrow keys, and obviously Esc ends the current insert.
The repeat .
command normally literally repeats the last insert, so it doesn't handle <C-r>=
well anyway: for example, try o<C-r>=localtime()<cr><cr><esc>....:echo localtime()<cr>
. Note that the buffer fills up with the same line repeated, while the function's value has changed.
For cases like this, use a macro (:help q
), which records the keystrokes literally.