-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Description
The sequence of commands yy
followed by p
results in a different outcome in a fresh install of Spacemacs, than is seen in vi/vim.
I saw this when I recently created a fresh install of Spacemacs on a new machine. On my older install of Spacemacs on a different machine, the behaviour matches that of Vi/Vim.
Steps to replicate:
-
Create a fresh install of Spacemacs and start it up:
$ emacs --version
GNU Emacs 30.2, etc$ mkdir -p ~/spacemacs-clean/home
$ git clone https://github.com/syl20bnr/spacemacs.git ~/spacemacs-clean/.emacs.d
Cloning into '/home/gphilip/spacemacs-clean/.emacs.d', etc.$ HOME=~/spacemacs-clean/home emacs --init-directory ~/spacemacs-clean/.emacs.d
-
Once the packages finish installing, switch to the scratch buffer and type in the following text:
Mary had a little lamb,
Little lamb, little lamb.
Mary had a little lamb,
Her fleece as white as snow.
- Go to normal mode. Place the cursor on the 'b' before the comma on the second line.
- Press yy
- Press p six times, one after the other.
This gives the following unexpected result:
Mary had a little lamb,
Little lambLittle lamb, little lamb.
,Little lamb, little lamb.
Little lamb, little lamb.
lLittle lamb, little lamb.
iLittle lamb, little lamb.
tLittle lamb, little lamb.
tle lamb.
Mary had a little lamb,
Her fleece as white as snow.
Vim, and my older Spacemacs installation, gives the following result, for steps 2 to 5:
Mary had a little lamb,
Little lamb, little lamb.
Little lamb, little lamb.
Little lamb, little lamb.
Little lamb, little lamb.
Little lamb, little lamb.
Little lamb, little lamb.
Little lamb, little lamb.
Mary had a little lamb,
Her fleece as white as snow.
As you can see, the new Spacemacs behaviour literally butchers the text.