0:00:01.567,0:00:03.800 Welcome back to emacs rocks! 0:00:03.800,0:00:09.567 In this episode we'll take another look at the vimgolf challenge in episode two. 0:00:09.567,0:00:13.667 These two emacs enthusiasts twittered me last night 0:00:13.667,0:00:17.300 with an even better solution to the problem 0:00:17.300,0:00:20.944 let's take a look at what they did 0:00:21.267,0:00:25.054 okay, I'll just run through it first 0:00:40.119,0:00:42.033 wow 0:00:42.033,0:00:47.746 that was ten keystrokes - it's almost like magic 0:00:50.159,0:00:53.367 the trick being used to shave off another two keystrokes 0:00:53.367,0:00:57.167 from last nights solution was transpose-lines 0:00:57.167,0:01:00.933 let's take a look at transpose-char first 0:01:00.933,0:01:06.167 if I typo like this, I can go back and switch 0:01:06.167,0:01:09.544 did you see it? switch! 0:01:09.544,0:01:13.367 but another way of thinking about transpose 0:01:13.367,0:01:19.867 is that you're actually moving the char forward 0:01:19.867,0:01:24.500 so that's what's being done with transpose-lines 0:01:24.500,0:01:28.333 ctrl-x t, and I move typo down 0:01:28.333,0:01:30.733 so that's what they're doing 0:01:30.733,0:01:34.552 I start ctrl-x t, ctrl-x t 0:01:34.552,0:01:37.467 and use that to move the first line down 0:01:37.467,0:01:39.219 okay, I'll walk through it 0:01:39.219,0:01:43.667 macro, 9x transpose-line 0:01:43.667,0:01:49.133 backspace, tab, back to the top 0:01:49.133,0:01:53.933 done with the macro, 9x repeat macro 0:01:53.933,0:01:56.233 amazing 0:01:56.233,0:01:58.667 so, best solution in vim: 17 0:01:58.667,0:02:00.367 last night: 12 0:02:00.367,0:02:03.300 today: 10 keystrokes 0:02:03.300,0:02:08.967 so thanks to Bodil and Christian for an awesome solution 0:02:09.967,9:59:59.000 if you want more of @emacsrocks, just follow me on twitter