I contemplated a startup a few years back that would let people copy the text from coding tutorials. Uploaders would include a text file/repo for the work they're referencing in the video and it would get cross referenced when shown on the video to ensure the text was 100% accurate when copied.
YouTube Text Overlay - coming soon.