1 00:00:00,735 --> 00:00:03,252 Welcome back to emacs rocks 2 00:00:03,252 --> 00:00:10,376 Today we're taking a look at two of my favorite ways of jumping around 3 00:00:12,653 --> 00:00:14,853 First out is ace-jump-mode 4 00:00:14,853 --> 00:00:20,869 I want to jump to the word "strict" in that "use strict" declaration at the top 5 00:00:20,869 --> 00:00:23,835 Wow, that was fast! 6 00:00:23,835 --> 00:00:30,154 Now, the third instance of the word rows in that return statement 7 00:00:30,154 --> 00:00:32,602 Again, straight to it! 8 00:00:32,602 --> 00:00:37,518 And I can jump straight back to where I started by popping the mark 9 00:00:37,518 --> 00:00:40,403 Okay, let's do that in slower motion 10 00:00:40,403 --> 00:00:42,034 I initialize ace-jump-mode, 11 00:00:42,034 --> 00:00:46,884 and then type the starting letter of the word I want to jump to: S 12 00:00:46,884 --> 00:00:51,502 notice how everything is greyed out, and the S is replaced by a red A 13 00:00:51,502 --> 00:00:53,552 I press A 14 00:00:53,552 --> 00:00:56,803 Next up is the word rows, starts with R 15 00:00:56,803 --> 00:01:01,467 See how all the words starting with R has its own letter? 16 00:01:01,467 --> 00:01:05,203 The one I want is number five from the top, or E 17 00:01:05,203 --> 00:01:09,480 Again, pop mark to get back 18 00:01:12,034 --> 00:01:14,404 I can also jump into the middle of a word 19 00:01:14,404 --> 00:01:17,469 by giving ace-jump-mode a prefix argument 20 00:01:17,469 --> 00:01:23,180 Like to the word "shape" in validateNonEmptyShape 21 00:01:23,534 --> 00:01:26,084 That was ace-jump-mode 22 00:01:26,084 --> 00:01:29,007 And it is ... ace! 23 00:01:30,284 --> 00:01:32,485 Next up is ido-imenu 24 00:01:32,485 --> 00:01:35,269 Depending on your major mode, it find symbols in the buffer 25 00:01:35,269 --> 00:01:38,854 and lets you jump quickly to them. 26 00:01:41,654 --> 00:01:44,785 I'd like to use pop-mark to jump back here aswell 27 00:01:44,785 --> 00:01:48,403 but ido-imenu doesn't set the mark before jumping. 28 00:01:48,403 --> 00:01:50,985 Luckily we're using a truly extensible editor, 29 00:01:50,985 --> 00:01:53,270 so I fixed that. 30 00:01:54,085 --> 00:01:56,502 Here's the script 31 00:01:56,502 --> 00:01:59,683 and you can find it at this gist. 32 00:02:04,437 --> 99:59:59,999 Thanks for watching emacs rocks.