[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.73,0:00:04.50,Default,,0000,0000,0000,,Welcome to emacs rocks, episode four. Dialogue: 0,0:00:04.50,0:00:07.60,Default,,0000,0000,0000,,Today I'll go all controversial on you - Dialogue: 0,0:00:07.60,0:00:11.03,Default,,0000,0000,0000,,and rebind some emacs keys. Dialogue: 0,0:00:11.03,0:00:13.26,Default,,0000,0000,0000,,That's what emacs is all about isn't it? Dialogue: 0,0:00:13.26,0:00:15.87,Default,,0000,0000,0000,,Sharpening that knife. Dialogue: 0,0:00:15.87,0:00:19.66,Default,,0000,0000,0000,,But first, a cool set of keystrokes. Dialogue: 0,0:00:20.34,0:00:24.57,Default,,0000,0000,0000,,I'm switching to buster.js for my javascript tests these days Dialogue: 0,0:00:24.57,0:00:28.13,Default,,0000,0000,0000,,and the syntax is slightly different Dialogue: 0,0:00:28.13,0:00:33.53,Default,,0000,0000,0000,,watch how quickly I can go from one to the other Dialogue: 0,0:00:33.93,0:00:36.46,Default,,0000,0000,0000,,done! hah Dialogue: 0,0:00:37.97,0:00:41.27,Default,,0000,0000,0000,,did you see the first keystroke? Dialogue: 0,0:00:41.27,0:00:43.93,Default,,0000,0000,0000,,ctrl-s is excellent for navigating Dialogue: 0,0:00:43.93,0:00:46.53,Default,,0000,0000,0000,,but for short distances, it's suboptimal Dialogue: 0,0:00:46.53,0:00:49.03,Default,,0000,0000,0000,,watch this Dialogue: 0,0:00:49.03,0:00:56.70,Default,,0000,0000,0000,,I have to press enter to exit from the search, to start typing Dialogue: 0,0:00:56.70,0:01:00.63,Default,,0000,0000,0000,,so let vim show the way with its excellent F-command Dialogue: 0,0:01:00.63,0:01:03.80,Default,,0000,0000,0000,,move to char Dialogue: 0,0:01:03.80,0:01:09.03,Default,,0000,0000,0000,,there's an extension called iy-go-to-char that does much the same Dialogue: 0,0:01:09.03,0:01:13.17,Default,,0000,0000,0000,,I mapped it to meta-m, as in move Dialogue: 0,0:01:13.17,0:01:16.90,Default,,0000,0000,0000,,yes, that keystroke is usually back to indentation Dialogue: 0,0:01:16.90,0:01:21.10,Default,,0000,0000,0000,,but I find a much better mnemonic for that is meta-i Dialogue: 0,0:01:21.10,0:01:26.11,Default,,0000,0000,0000,,so ... meta-m t, and I can press period right away Dialogue: 0,0:01:26.11,0:01:29.40,Default,,0000,0000,0000,,meta-l for lower case, Dialogue: 0,0:01:29.40,0:01:32.03,Default,,0000,0000,0000,,which conveniently moves my cursor to the end of the word Dialogue: 0,0:01:32.03,0:01:34.90,Default,,0000,0000,0000,,forward, and transpose-word Dialogue: 0,0:01:34.90,0:01:39.93,Default,,0000,0000,0000,,we had transpose-line and transpose-char in a previous episode Dialogue: 0,0:01:39.93,0:01:44.40,Default,,0000,0000,0000,,so this is transpose-word ... nice, huh? Dialogue: 0,0:01:44.40,0:01:48.77,Default,,0000,0000,0000,,so, iy-go-to-char - you can just google it Dialogue: 0,0:01:48.77,0:01:50.76,Default,,0000,0000,0000,,it's really nice Dialogue: 0,0:01:50.76,0:01:55.03,Default,,0000,0000,0000,,you don't have to bind it to the same key as me if you find that controversial Dialogue: 0,0:01:55.03,0:02:01.21,Default,,0000,0000,0000,,I see that the suggested keystroke is ctrl-c f Dialogue: 0,0:02:01.21,0:02:04.27,Default,,0000,0000,0000,,since it's supposed to be a short command for quick navigation, Dialogue: 0,0:02:04.27,0:02:06.90,Default,,0000,0000,0000,,I want to have it on one keystroke Dialogue: 0,0:02:06.90,0:02:10.52,Default,,0000,0000,0000,,let's take a look at another example Dialogue: 0,0:02:10.52,0:02:14.00,Default,,0000,0000,0000,,here's a misspelled word - and another Dialogue: 0,0:02:14.00,0:02:17.27,Default,,0000,0000,0000,,to quickly fix those I press: Dialogue: 0,0:02:17.27,0:02:20.13,Default,,0000,0000,0000,,meta-m p e Dialogue: 0,0:02:20.13,0:02:22.90,Default,,0000,0000,0000,,meta-m o, and o again, t Dialogue: 0,0:02:23.58,0:02:26.30,Default,,0000,0000,0000,,very nice Dialogue: 0,0:02:26.79,0:02:28.05,Default,,0000,0000,0000,,that was episode four Dialogue: 0,0:02:28.05,0:02:29.65,Default,,0000,0000,0000,,hope you enjoyed it Dialogue: 0,0:02:29.65,0:02:31.37,Default,,0000,0000,0000,,see you next time