I don't usually have this much trouble debugging issues, but I'm starting to get stumped.
The line doesn't happen when typing the macro out (running it by hand). In fact, it's part of something I recorded.
This doesn't happen when using
vim -u NONE, which leads me to believe it's due to something in my configuration. I tried to find the issue by deleting my configuration by sections until I found the one that caused it. However, I've moved and deleted all run-time loaded vim code (I even moved
/usr/share/vim/ elsewhere) as well as my
~/.viminfo files and the problem still persists.
I listed all vim related files that vim referred to in system calls:
$ strace -fe trace=file vim +q |& grep -Po '[^"]*vim[^"]*(?=")' | sort | uniq /etc/vimrc /home/jol/.vim/after/pack/ /home/jol/.vim/after/plugin/ /home/jol/.viminfo /home/jol/.vim/pack/ /home/jol/.vim/plugin/ /home/jol/.vimrc /usr/bin/vim /usr/share/vim /usr/share/vim/lang/en/LC_MESSAGES/vim.mo /usr/share/vim/lang/en_US/LC_MESSAGES/vim.mo /usr/share/vim/lang/en_US.utf8/LC_MESSAGES/vim.mo /usr/share/vim/lang/en_US.UTF-8/LC_MESSAGES/vim.mo /usr/share/vim/lang/en.utf8/LC_MESSAGES/vim.mo /usr/share/vim/lang/en.UTF-8/LC_MESSAGES/vim.mo /usr/share/vim/pack/ /usr/share/vim/plugin/ /usr/share/vim/runtime /usr/share/vim/vim81 /usr/share/vim/vimfiles/after/pack/ /usr/share/vim/vimfiles/after/plugin/ /usr/share/vim/vimfiles/pack/ /usr/share/vim/vimfiles/plugin/ vim
~/.vimrc exist, but are empty.
~/.viminfo was generated.
vim -D in these circumstances only results in:
Entering Debug mode. Type "cont" to continue. /etc/vimrc line 2: End of sourced file >
Any idea for further debugging is appreciated.
EDIT: Hmm. I found something interesting. Apparently,
ofoo^[Obar^[ works perfectly....
ofoo^[Orar^[ fails by making new line "foo2ar". Running
:abbrev returns "No abbreviation found".
EDIT 2: Macro
^[Orx^[ deletes 2 letters from the cursor position. I guess it's evaluated like
EDIT 3: Macro
^[Otx^[ works like
ofoo^[Otx^[ does indeed print
foo4x in a new line.
EDIT 4: Macro
ofoo^[Oyx^[ only prints