What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

For example,

when I copy a code snippet from someone's answer on StackOverflow and then paste it into Excel or Notepad there are all these extra spaces at the end of each line.

Is there anyway to stop this happening? Or a quick way to remove this annoying spaces - I need them gone otherwise the VBScript compiler complains.

share|improve this question

migrated from stackoverflow.com Sep 16 '11 at 10:20

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

up vote 2 down vote accepted

Get rid of Notepad, download and install Notepad++. It has a bundled plug-in called TextFX that among dozens of other useful things can trim trailing blanks. See this tutorial for even more cool stuff Notepad++ can do.

share|improve this answer
add comment

If you use Firefox and really want to stick to notepad (I guess you'll use IE then) you can try a copy text plugin like this one or similar (I haven't tried it)

share|improve this answer
add comment

You must log in to answer this question.