0

TERM=xterm-256color

When I cut and paste on the terminal, there are no trailing spaces in the output. If I copy from the terminal and paste into vim, there are no trailing spaces in the paste. When I use vim, with the molokai color scheme, whatever I copy and paste has trailing spaces. What my mouse has highlighted, including blank space after the real lines, is pasted. I did not have the problem before using the color scheme. Can this be fixed without ditching the otherwise great color scheme?

  • 1
    Are you sure it's the fault of the colorscheme? Vim is supposed to include trailng spaces in copy/paste, or it's not doing its job (it's never safe for an application to assume it's okay to exclude data). – Heptite Dec 9 '16 at 19:31
  • @Heptite - the spaces don't exist in the file. They are "made up" by vim when I paste (the mouse highlight included blank space, and vim turned it into spaces on paste.) I don't know why the color scheme would cause this, but I didn't have the problem before it. – horse hair Dec 9 '16 at 20:04
  • 1
    My mistake. If you haven't already, you might want to do :set mouse=a and let VIm handle cut and paste within the terminal, instead of letting the terminal do it. – Heptite Dec 9 '16 at 20:07
  • 1
    What does :set list show? – Heptite Dec 9 '16 at 20:12
  • 1
    I'm stumped. Hopefully someone else can help. – Heptite Dec 9 '16 at 20:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.