These characters are used for bracketed paste mode. What are these ^[[200~ ~ characters and how do I get rid of them? Surely they must stand for something specific as they are always the same and appear on both macOS and Linux.
This is certainly not always but several times a day and I've not managed to narrow down what causes it and can't reliably recreate it. I cancelled with ctrl c and (without recopying) pasted again with ⌘ v and it was OK. If I cancel and paste again then it is pasted correctly.įor example here I tried to paste git clone copied from their webpage into iTerm2 with with ⌘ v. The characters are always the same - before the pasted text I get ^[[200~ (with the ^[ highlighted) and after the pasted text an extra ~. I have noticed that when pasting into a terminal emulator, both on macOS (using Terminal.app or iTerm2.app) or in Linux (using urxvt) sometimes I get extra characters.