How to avoid trailing spaces when you copy something from terminal?
- by Michael Härtl
I often copy a code snippet from a SSH terminal session where i'm logged in to some remote server and have a file opened in vim, for example to paste it here into an answer at SO. It frequently happens, that the code is padded with trailing spaces to match the terminal width.
Whereas i've seen this on both, my Ubuntu and Windows machines (using…