Using WSL2/WSLg and Ubuntu 22.04 LTS under it, with gVim running and has a Linux file opened (i.e. with
LF endings only), when I paste text from Windows into gVim, all the lines pasted have the
^M characters pasted with them. For example:
This line is original from the Linux file.
This one too.
This line was pasted from Window's clipboard^M <<< Lines pasted
and this one too.^M <<< from Windows
Now another original line from the Linux file.
How can I instruct gVim to eat up the carriage returns while pasting if the fileformat is unix?
I search the web to novail. Not even the GPT AIs of the day could provide me some help.