When watching YouTube video lectures, I often wish to save the dialog to a text file that I can search. You can obtain a text transcript of the audio for a YouTube video lecture by clicking on the three dots to the right of "Share", which will give you the option to "Open transcript." When you choose that option, you will then see a transcript displayed to the right of the video. But when you copy that text to a text editor, you may see the dialog on separate lines from the accompanying timestamps. You can put each line of dialog on the same line as its timestamp using the regular expression
1,$ s/\(:\d\d\)\n/\1 /
within the vi or vim text editors.
[ More Info ]