]> code.delx.au - gnu-emacs-elpa/blob - README.md
avy-jump.el (avy-setup-default): Setup some bindings
[gnu-emacs-elpa] / README.md
1 ## Introduction
2
3 `avy-jump` is a GNU Emacs package for jumping to visible text using a char-based decision tree. See also [ace-jump-mode](https://github.com/winterTTr/ace-jump-mode) and [vim-easymotion](https://github.com/Lokaltog/vim-easymotion) - `avy-jump` uses the same idea.
4
5 ![logo](https://raw.githubusercontent.com/wiki/abo-abo/avy-jump/images/avy-avatar-1.png)
6
7 ## Command overview
8
9 You can bind some of these useful commands in your config.
10
11 ### `avy-goto-char`
12
13 > Input one char, jump to it with a tree.
14
15 ```elisp
16 (global-set-key (kbd "π") 'avy-goto-char)
17 ```
18
19 After <kbd>πb</kbd>:
20
21 ![avy-goto-char](http://oremacs.com/download/avi-goto-char.png)
22
23 ### `avy-goto-char-2`
24
25 > Input two consecutive chars, jump to the first one with a tree.
26
27 The advantage over the previous one is less candidates for the tree search. And it's not too inconvenient to enter two consecutive chars instead of one.
28
29 ```elisp
30 (global-set-key (kbd "C-'") 'avy-goto-char-2)
31 ```
32
33 After <kbd>C-' bu</kbd>:
34
35 ![avy-goto-char-2](http://oremacs.com/download/avi-goto-char-2.png)
36
37 ### `avy-goto-line`
38
39 > Input zero chars, jump to a line start with a tree.
40
41 ```elisp
42 (global-set-key (kbd "M-g f") 'avy-goto-line)
43 ```
44
45 After <kbd>M-g f</kbd>:
46
47 ![avy-goto-line](http://oremacs.com/download/avi-goto-line.png)
48
49 ### `avy-goto-word-1`
50
51 > Input one char at word start, jump to a word start with a tree.
52
53 ```elisp
54 (global-set-key (kbd "M-g w") 'avy-goto-word-1)
55 ```
56
57 After <kbd>M-g wb</kbd>:
58
59 ![avy-goto-word-1](http://oremacs.com/download/avi-goto-word-1.png)
60
61 ### `avy-goto-word-0`
62
63 > Input zero chars, jump to a word start with a tree.
64
65 Compared to `avy-goto-word-1`, there are a lot more candidates. But at a least there's not need to input the initial char.
66
67 ```elisp
68 (global-set-key (kbd "M-g e") 'avy-goto-word-0)
69 ```
70
71 After <kbd>M-g e</kbd>:
72
73 ![avy-goto-word-0](http://oremacs.com/download/avi-goto-word-0.png)
74
75
76 ### Other commands
77
78 There are some more commands which you can explore yourself by looking at the code.
79
80 ### Bindings
81
82 You add this to your config to bind some stuff:
83
84 ```elisp
85 (avy-setup-default)
86 ```
87
88 It will bind, for example, `avy-isearch` to <kbd>C-'</kbd> in `isearch-mode-map`, so that you can select one of the currently visible `isearch` candidates using `avy`.