0

I am using xrdp (mobaXterm, remoteNG) to connect to my Ubuntu.

When i paste text from my host machine to Ubuntu into any basic text editors like vi, vim, nano i have got an empty line after each line like.

Original text:

111
222
333

Pasted text:

111

222

333

If I paste it to some GUI editor like vscode and other it is not reproduced. When i connected to Ubuntu machine via ssh it works fine as well.

It seems some global setting for all basic editors, as i also tried install neo vim, but same problem with that.

If i try basic gui editor like gdit it also works fine.

How can i fix this behavior?

Pavel Mi
  • 45
  • 2
  • 7
  • 2
    This is possibly an issue with Windows line endings. – Raman Sailopal Jan 02 '21 at 11:14
  • 2
    In terminal emulators and thus editors running in terminal emulators, "pasting" is really just typing very quickly. If what you are pasting contains "foo\nbar", then each character will be inserted one after the other. If you have "foo\n\rbar", as hinted by @RamanSailopal, you will have "f" typed, then "o", then "o", then "enter", then "enter", then "b", then "a", then "r". Maybe you can configure one of your middlemen to convert Windows line endings to Unix ones? – romainl Jan 02 '21 at 12:46

0 Answers0