[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.00,0:00:03.44,Default,,0000,0000,0000,,Hi! Welcome back to Emacs rocks! Dialogue: 0,0:00:03.44,0:00:08.12,Default,,0000,0000,0000,,It's episode 2 and today I have a real treat for you. Check it out! Dialogue: 0,0:00:08.12,0:00:10.56,Default,,0000,0000,0000,,It's VimGolf! Yay! Dialogue: 0,0:00:11.90,0:00:15.92,Default,,0000,0000,0000,,VimGolf is really cool, I really wish there was one for Emacs. Dialogue: 0,0:00:17.29,0:00:21.37,Default,,0000,0000,0000,,It's a competition and the goal is to transform Dialogue: 0,0:00:21.39,0:00:23.66,Default,,0000,0000,0000,,the starting file into the ending file Dialogue: 0,0:00:23.66,0:00:26.80,Default,,0000,0000,0000,,in as few keystrokes as possible. Dialogue: 0,0:00:29.51,0:00:33.24,Default,,0000,0000,0000,,So, this is challenge number 6 and Dialogue: 0,0:00:33.24,0:00:39.15,Default,,0000,0000,0000,,there is a one to ten in letters and a one to ten in numbers Dialogue: 0,0:00:39.15,0:00:43.92,Default,,0000,0000,0000,,and the goal is to get the one to ten lined up in two columns. Dialogue: 0,0:00:45.38,0:00:49.79,Default,,0000,0000,0000,,So the best score into Vim is 17, is the winning score. Dialogue: 0,0:00:51.05,0:00:54.23,Default,,0000,0000,0000,,So let's see if Emacs might do a little bit better. Dialogue: 0,0:01:12.83,0:01:17.00,Default,,0000,0000,0000,,Ok, I'll run through it one time without commentary Dialogue: 0,0:01:17.02,0:01:20.26,Default,,0000,0000,0000,,and then I'll run through it again and tell you what I'm doing. Dialogue: 0,0:01:20.26,0:01:22.79,Default,,0000,0000,0000,,So pay attention to the keystrokes. Dialogue: 0,0:01:46.00,0:01:49.82,Default,,0000,0000,0000,,Haha! Now wasn't that awesome. Dialogue: 0,0:01:50.01,0:01:53.17,Default,,0000,0000,0000,,Let's see it again in slow motion. Dialogue: 0,0:02:01.62,0:02:04.25,Default,,0000,0000,0000,,Ok, now we are back to the start. Dialogue: 0,0:02:04.94,0:02:09.28,Default,,0000,0000,0000,,This is the first episode where I use macros but it won't be the last! Dialogue: 0,0:02:09.28,0:02:12.41,Default,,0000,0000,0000,,Macros is a powerhorse in Emacs. Dialogue: 0,0:02:12.41,0:02:15.66,Default,,0000,0000,0000,,So I start by defining a macro pressing F3 Dialogue: 0,0:02:15.66,0:02:21.89,Default,,0000,0000,0000,,then jump to the bottom and I delete all. Dialogue: 0,0:02:22.38,0:02:27.43,Default,,0000,0000,0000,,This puts it into the kill ring and I erase the space Dialogue: 0,0:02:27.43,0:02:30.14,Default,,0000,0000,0000,,and then I press Control-9 Dialogue: 0,0:02:30.14,0:02:32.69,Default,,0000,0000,0000,,Control-9 doesn't do anything on it's own, Dialogue: 0,0:02:32.69,0:02:35.68,Default,,0000,0000,0000,,but it makes my next command repeat 9 times. Dialogue: 0,0:02:36.78,0:02:41.93,Default,,0000,0000,0000,,Which is command p for previous line, 9 lines up Dialogue: 0,0:02:42.50,0:02:48.58,Default,,0000,0000,0000,,Control-E, tab, yank, and my macro is finished. Dialogue: 0,0:02:48.58,0:02:52.18,Default,,0000,0000,0000,,So I press F4 to complete my macro and now Dialogue: 0,0:02:52.18,0:02:57.63,Default,,0000,0000,0000,,I can run that macro nine times, Control-9 F4. Dialogue: 0,0:02:58.47,0:03:00.10,Default,,0000,0000,0000,,Done. Dialogue: 0,0:03:00.10,0:03:03.01,Default,,0000,0000,0000,,And that was 12 keystrokes. Dialogue: 0,0:03:03.01,0:03:06.75,Default,,0000,0000,0000,,Let me remind tou, best in Vim, 17. Dialogue: 0,0:03:07.48,0:03:09.94,Default,,0000,0000,0000,,So, to reiterate Dialogue: 0,0:03:11.62,0:03:14.52,Default,,0000,0000,0000,,Emacs rocks!