Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ctrl-A, Ctrl-X do not repeat inside of macros on gvim from Ubuntu jammy #46

Open
chiphogg opened this issue Mar 11, 2023 · 1 comment
Open

Comments

@chiphogg
Copy link

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):

  1. Insert a 1.
  2. Record a macro that increments it: qq<C-A>q
  3. 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
@chiphogg
Copy link
Author

chiphogg commented May 1, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant