I use the Windows as my main os, and the putty link to a Ubuntu. When I copy a string in Windows and paste into the putty bash command line I always get a wave mark at the head of the string. Why's that? But if I paste the same string when I enter vim in the putty, the string shows fine without the wave mark. How to fix it?

This is what is shown on my pc

1

There are 1 best solutions below

0
On

I know the reason when I use the shift + insert. The text pasted in the putty will get a ~ at the head of the string.

But if you use ctrl + v the ~ will not show out.

shift + insert seems to be a special mark in the putty. If you make you clipboard empty just press shift + ins in the putty window you will get only ~. 1221105902.png

But sometimes Ctrl + v will trigger other things (like the block-wise visual in vim). So you can use AHK in windows. Now I use the AHK to imitate the keystroke shift + insert

And the code should be like this:

^v::
{
send, +{ins}
return
}

hope this will be useful to you~