Why everybody seems to be doing it the hard way... simply click on the
start of the first line of code, so that the cursor blinks over there.
then scroll down to the end of code which you want to copy. press down
Shift and click with mouse. And presto you have the code selected!