[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:01.57,0:00:03.80,Default,,0000,0000,0000,,Welcome back to emacs rocks! Dialogue: 0,0:00:03.80,0:00:09.57,Default,,0000,0000,0000,,In this episode we'll take another look at the vimgolf challenge in episode two. Dialogue: 0,0:00:09.57,0:00:13.67,Default,,0000,0000,0000,,These two emacs enthusiasts twittered me last night Dialogue: 0,0:00:13.67,0:00:17.30,Default,,0000,0000,0000,,with an even better solution to the problem Dialogue: 0,0:00:17.30,0:00:20.94,Default,,0000,0000,0000,,let's take a look at what they did Dialogue: 0,0:00:21.27,0:00:25.05,Default,,0000,0000,0000,,okay, I'll just run through it first Dialogue: 0,0:00:40.12,0:00:42.03,Default,,0000,0000,0000,,wow Dialogue: 0,0:00:42.03,0:00:47.75,Default,,0000,0000,0000,,that was {\i1}ten{\i0} keystrokes - it's almost like magic Dialogue: 0,0:00:50.16,0:00:53.37,Default,,0000,0000,0000,,the trick being used to shave off another two keystrokes Dialogue: 0,0:00:53.37,0:00:57.17,Default,,0000,0000,0000,,from last nights solution was transpose-lines Dialogue: 0,0:00:57.17,0:01:00.93,Default,,0000,0000,0000,,let's take a look at transpose-char first Dialogue: 0,0:01:00.93,0:01:06.17,Default,,0000,0000,0000,,if I typo like this, I can go back and switch Dialogue: 0,0:01:06.17,0:01:09.54,Default,,0000,0000,0000,,did you see it? switch! Dialogue: 0,0:01:09.54,0:01:13.37,Default,,0000,0000,0000,,but another way of thinking about transpose Dialogue: 0,0:01:13.37,0:01:19.87,Default,,0000,0000,0000,,is that you're actually moving the char forward Dialogue: 0,0:01:19.87,0:01:24.50,Default,,0000,0000,0000,,so that's what's being done with transpose-lines Dialogue: 0,0:01:24.50,0:01:28.33,Default,,0000,0000,0000,,ctrl-x t, and I move typo down Dialogue: 0,0:01:28.33,0:01:30.73,Default,,0000,0000,0000,,so that's what they're doing Dialogue: 0,0:01:30.73,0:01:34.55,Default,,0000,0000,0000,,I start ctrl-x t, ctrl-x t Dialogue: 0,0:01:34.55,0:01:37.47,Default,,0000,0000,0000,,and use that to move the first line down Dialogue: 0,0:01:37.47,0:01:39.22,Default,,0000,0000,0000,,okay, I'll walk through it Dialogue: 0,0:01:39.22,0:01:43.67,Default,,0000,0000,0000,,macro, 9x transpose-line Dialogue: 0,0:01:43.67,0:01:49.13,Default,,0000,0000,0000,,backspace, tab, back to the top Dialogue: 0,0:01:49.13,0:01:53.93,Default,,0000,0000,0000,,done with the macro, 9x repeat macro Dialogue: 0,0:01:53.93,0:01:56.23,Default,,0000,0000,0000,,amazing Dialogue: 0,0:01:56.23,0:01:58.67,Default,,0000,0000,0000,,so, best solution in vim: 17 Dialogue: 0,0:01:58.67,0:02:00.37,Default,,0000,0000,0000,,last night: 12 Dialogue: 0,0:02:00.37,0:02:03.30,Default,,0000,0000,0000,,today: 10 keystrokes Dialogue: 0,0:02:03.30,0:02:08.97,Default,,0000,0000,0000,,so thanks to Bodil and Christian for an awesome solution Dialogue: 0,0:02:09.97,9:59:59.99,Default,,0000,0000,0000,,if you want more of @emacsrocks, just follow me on twitter