avy-jump.el (avy-setup-default): Setup some bindings

* README.md: Add a description.

Fixes #10
This commit is contained in:
Oleh Krehel 2015-05-08 15:20:08 +02:00
parent f2290f262a
commit 32003515c8
2 changed files with 17 additions and 1 deletions

View File

@ -76,3 +76,13 @@ After <kbd>M-g e</kbd>:
### Other commands ### Other commands
There are some more commands which you can explore yourself by looking at the code. There are some more commands which you can explore yourself by looking at the code.
### Bindings
You add this to your config to bind some stuff:
```elisp
(avy-setup-default)
```
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`.

View File

@ -1,4 +1,4 @@
;;; avy-jump.el --- jump to things tree-style ;;; avy-jump.el --- jump to things tree-style. -*- lexical-binding: t -*-
;; Copyright (C) 2015 Free Software Foundation, Inc. ;; Copyright (C) 2015 Free Software Foundation, Inc.
@ -437,6 +437,12 @@ ARG lines can be used."
(line-end-position))) (line-end-position)))
pad)))) pad))))
;;;###autoload
(defun avy-setup-default ()
"Setup the default shortcuts."
(eval-after-load 'isearch
'(define-key isearch-mode-map (kbd "C-'") 'avy-isearch)))
(define-obsolete-variable-alias 'avi-keys 'avy-keys "0.1.0") (define-obsolete-variable-alias 'avi-keys 'avy-keys "0.1.0")
(define-obsolete-variable-alias 'avi-background 'avy-background "0.1.0") (define-obsolete-variable-alias 'avi-background 'avy-background "0.1.0")
(define-obsolete-variable-alias 'avi-word-punc-regexp 'avy-word-punc-regexp "0.1.0") (define-obsolete-variable-alias 'avi-word-punc-regexp 'avy-word-punc-regexp "0.1.0")