5

I get 0~ symbol before the text and 1~ after the text while pasting it on to the terminal window.

Is it related to some edits that I made in .bashrc or .vimrc files?

Eg: I see '0~allowed1~' when I press ctrl+shift+v while pasting the text 'allowed'

  • 1
    I don't see how the edits could be relevant but we can't know since you don't show us what you did. Please [edit] your question and give us more details. What exactly did you change in .bashrc? How are you copying (ctrl+C? simple selection? a clipboard manager?)? What are you copying from? Does it also happen if you paste into xterm or any other terminal? Run cat >> file.foo then paste the text, hit Ctrl+C and then run cat file.foo | od -c and add the output to your question. That will show us what characters are actually being pasted. – terdon Nov 28 '17 at 13:54
  • 3
    Sounds like you've enabled bracketed paste mode - see for example Copy-Paste in xfce4-terminal adds 0~ and 1~ – steeldriver Nov 28 '17 at 19:33
  • @steeldriver Thank you for the link. I was able to fix my issue. I did not add set t_BE= to my .vimrc file. That was causing this problem. – The Hello World Guy Nov 29 '17 at 05:18
  • @terdon thank you for showing concern to my problem. I was able to solve it with steeldriver 's help – The Hello World Guy Nov 29 '17 at 05:21
  • Great! Please post an answer explaining what you did to solve it so the question can be marked as solved. Thanks! – terdon Nov 29 '17 at 08:41

2 Answers2

2

There is an additional way that this problem can manifest. Readline's ~/.inputrc file can contain the following:

set enable-bracketed-paste On

This is not fixed by the above method and has eluded me for months. Removing this line or setting

set enable-bracketed-paste Off

will fix this nicely.

Consult the man page for readline for more information on this parameter and the ~/.inputrc file since you can change the file's location with the INPUTRC environment variable

DanG
  • 21
  • 2
1

I was able to solve this problem by adding set t_BE= to my .vimrc file. thanks for the help @terdon and @steeldriver.

Copy-Paste in xfce4-terminal adds 0~ and 1~