Sometimes when I copy+paste into my spacemacs over SSH, I get some random garbage that seems to be due to spacemacs interpreting some of the pasted content as commands. In vim, my workaround is to run r! cat
, paste what I want into the cat
command, then Ctrl-D
to exit. When I run M-x shell-command ENTER cat ENTER
, however, I get (shell command succeeded with no output)
immediately, and no prompt.
What is the right way to get the equivalent of r! cat
from emacs (or spacemacs, in particular)?
cat
? I, for one, would appreciate more detail about what is going wrong and how exactly your workaround solves the problem.evil-escape-key-sequence
, it leaves insert mode and interprets the rest of the pasted text as normal mode commands. Or if I paste text with unbalanced parens,smartparens
inserts some unwanted close parens at the end of the pasted text.cat
and delete the key sequence and in the second case you add/delete parens to make it balanced, before you signal EOF tocat
?cat
output as keyboard input, so the auto-formatting doesn't fire.