Ctrl-A, Ctrl-X do not repeat inside of macros on gvim from Ubuntu jammy
This is the version included in Ubuntu's "Jammy Jellyfish" release (22.04, LTS):
:version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 11 2023 23:53:12)
Included patches: 1-3995, 4563, 4646, 4774, 4895, 4899, 4901, 4919
Here is a minimal reproduction. First, the .vimrc:
call plug#begin('~/.vim/plugged')
Plug 'tpope/vim-speeddating'
call plug#end()
(Naturally, this is for users who have set up vim-plug already. I assume this happens no matter how the plugin was installed!)
To reproduce with this .vimrc, follow these steps in a new vim session (blank file):
- Insert a
1. - Record a macro that increments it:
qq<C-A>q - Play back the macro:
@q
With this plugin involved, nothing happens. Without it --- e.g., vim -u NONE --- the number increments every time you @q.
Decrementing with <C-X> has the same behaviour.
I do not see this behaviour in 18.04's version:
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 20 2022 02:47:53)
Included patches: 1-1453, 3625, 3669, 3741
I've found a workaround in the meantime. Whenever this happens, the contents of the macro include surprising control characters. For example, printing the above macro with "qp gives: <9b><fc>^DA, where each of <9b>, <fc>, and ^D are a single character. I can delete these, and by typing <Ctrl-V><Ctrl-A>, I can get the single control character ^A. Then, using "qy$, I can put the corrected macro sequence in register q, and then the macro works as expected.
I hope this observation provides some clue as to what's going on. In any case, though, it gives me a workaround (however tedious) in the meantime.