diff --git a/README.md b/README.md index 4755742..01bf587 100644 --- a/README.md +++ b/README.md @@ -76,3 +76,13 @@ After M-g e: ### Other commands 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 C-' in `isearch-mode-map`, so that you can select one of the currently visible `isearch` candidates using `avy`. diff --git a/avy-jump.el b/avy-jump.el index 60b9160..d6bb52e 100644 --- a/avy-jump.el +++ b/avy-jump.el @@ -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. @@ -437,6 +437,12 @@ ARG lines can be used." (line-end-position))) 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-background 'avy-background "0.1.0") (define-obsolete-variable-alias 'avi-word-punc-regexp 'avy-word-punc-regexp "0.1.0")