0:00:00.729,0:00:04.500 Welcome to emacs rocks, episode four. 0:00:04.500,0:00:07.600 Today I'll go all controversial on you - 0:00:07.600,0:00:11.033 and rebind some emacs keys. 0:00:11.033,0:00:13.259 That's what emacs is all about isn't it? 0:00:13.259,0:00:15.867 Sharpening that knife. 0:00:15.867,0:00:19.659 But first, a cool set of keystrokes. 0:00:20.341,0:00:24.567 I'm switching to buster.js for my javascript tests these days 0:00:24.567,0:00:28.133 and the syntax is slightly different 0:00:28.133,0:00:33.533 watch how quickly I can go from one to the other 0:00:33.933,0:00:36.459 done! hah 0:00:37.967,0:00:41.267 did you see the first keystroke? 0:00:41.267,0:00:43.932 ctrl-s is excellent for navigating 0:00:43.932,0:00:46.533 but for short distances, it's suboptimal 0:00:46.533,0:00:49.033 watch this 0:00:49.033,0:00:56.703 I have to press enter to exit from the search, to start typing 0:00:56.703,0:01:00.633 so let vim show the way with its excellent F-command 0:01:00.633,0:01:03.800 move to char 0:01:03.800,0:01:09.033 there's an extension called iy-go-to-char that does much the same 0:01:09.033,0:01:13.167 I mapped it to meta-m, as in move 0:01:13.167,0:01:16.900 yes, that keystroke is usually back to indentation 0:01:16.900,0:01:21.100 but I find a much better mnemonic for that is meta-i 0:01:21.100,0:01:26.110 so ... meta-m t, and I can press period right away 0:01:26.110,0:01:29.400 meta-l for lower case, 0:01:29.400,0:01:32.033 which conveniently moves my cursor to the end of the word 0:01:32.033,0:01:34.900 forward, and transpose-word 0:01:34.900,0:01:39.933 we had transpose-line and transpose-char in a previous episode 0:01:39.933,0:01:44.400 so this is transpose-word ... nice, huh? 0:01:44.400,0:01:48.767 so, iy-go-to-char - you can just google it 0:01:48.767,0:01:50.759 it's really nice 0:01:50.759,0:01:55.033 you don't have to bind it to the same key as me if you find that controversial 0:01:55.033,0:02:01.208 I see that the suggested keystroke is ctrl-c f 0:02:01.208,0:02:04.273 since it's supposed to be a short command for quick navigation, 0:02:04.273,0:02:06.900 I want to have it on one keystroke 0:02:06.900,0:02:10.519 let's take a look at another example 0:02:10.519,0:02:14.000 here's a misspelled word - and another 0:02:14.000,0:02:17.267 to quickly fix those I press: 0:02:17.267,0:02:20.133 meta-m p e 0:02:20.133,0:02:22.900 meta-m o, and o again, t 0:02:23.577,0:02:26.295 very nice 0:02:26.787,0:02:28.054 that was episode four 0:02:28.054,0:02:29.646 hope you enjoyed it 0:02:29.646,0:02:31.369 see you next time