269 Commits

Author SHA1 Message Date
Tassilo Horn
48aa2cd828 Improve avy-goto-char-timer so that it may read 1 or many chars
Now you can use avy-goto-char-timer and type as many chars as you want
given each char comes before avy-timeout-seconds (and the very first
char is mandatory, i.e., there is no timeout for the first one).
2015-09-09 16:51:17 +02:00
Akira Tamamori
ac162279f2 Add padding for wide-width character
Add padding for wide-width character (ex. Japanese and Chinese).
2015-09-04 10:38:10 +09:00
Oleh Krehel
b1ef1f8f8c avy.el (avy--line): Obey avy-background
Fixes #94
2015-08-24 11:11:26 +02:00
Oleh Krehel
72afecbc29 avy.el (avy-push-mark): Bring back push-mark
Fixes abo-abo/ace-window#41
2015-08-21 20:59:19 +02:00
Oleh Krehel
53decea669 avy.el (avy--line): Don't error on end of buffer
Re #91
2015-08-21 18:17:53 +02:00
Oleh Krehel
a6cfedaf5e avy.el (avy-goto-subword-0): Don't offer invisible chars
Fixes #90
2015-08-21 14:50:57 +02:00
Oleh Krehel
009c0bc1ed avy.el (avy--line): Work for visual-line-mode
Use `point' instead of `line-beginning-position'.

Fixes #91
2015-08-21 14:47:32 +02:00
Oleh Krehel
2c74d0160a avy.el (avy--generic-jump): Add beg and end optional args
* avy.el (avy-goto-char-in-line): Update.

Fixes #89
2015-08-21 14:34:07 +02:00
Oleh Krehel
36b296c82a avy.el (subword-backward-regexp): Fix declaration 2015-08-21 14:31:34 +02:00
Oleh Krehel
ed120ea164 avy.el (avy-goto-line): Allow numeric prefix arg
The old behavior remains for ARG 1 and 4. For all other ARG, simply go
to that line.

Fixes #86
2015-08-21 14:22:56 +02:00
Oleh Krehel
53d457cfe4 Add misc punctuation to subword commands
* avy.el (avy-goto-subword-0): Temporarily bind
  `subword-backward-regexp' to allow chars like ! or @ to count as
  subword parts.

Fixes #93
2015-08-21 13:19:36 +02:00
Oleh Krehel
dbd2d2018d avy.el (avy-pop-mark): Handle multiple frames
Re #88
2015-08-07 15:48:30 +02:00
Oleh Krehel
a86bdee66c avy.el (avy-pop-mark): use own history for points and windows
* avy.el (avy-action-goto): Don't save mark here, since the window was
  already changed.
(avy--process): Set mark here.
(avy-ring): New defvar.
(avy-push-mark): New defun.
(avy-pop-mark): Use `avy-ring' unless it's empty. Then use the mark ring.

Fixes #88
Re #69
Re #81
2015-08-07 15:06:28 +02:00
B Jacquet
1e578a147a Considers letter case only if given Upcase letter
Fixes #87
2015-08-07 12:58:36 +02:00
Oleh Krehel
30067ddc09 avy.el (avy-action-goto): Don't push mark when region is active
* avy.el (avy-action-goto): When the region is active, the user probably
  doesn't want to move the mark.

Fixes #84
2015-07-29 17:59:42 +02:00
Dror Levin
e8cebf1616 Make arg optional in avy-goto-subword-1 2015-07-21 15:42:21 +03:00
Markus Hauck
d22493c0ec Autload avy-goto-word-or-subword-1
Fixes #82
2015-07-21 09:31:53 +02:00
Oleh Krehel
492ac494e9 avy.el (avy-pop-mark): Add
Fixes #81
2015-07-21 09:28:29 +02:00
Oleh Krehel
26123a7b37 avy.el (avy-goto-line): Fixup goto-line clause
Fixes #79
2015-07-16 22:03:25 +02:00
Oleh Krehel
3b9a60a334 avy.el (avy-dispatch-alist): Upgrade to defcustom
* avy.el (avy-handler-default): `avy-dispatch-alist' is actually an
  alist now.
2015-07-16 16:07:28 +02:00
Oleh Krehel
a6db8a3506 Rename avy--with-avy-keys to avy-with
* avy.el (avy-with): Macro renamed from `avy--with-avy-keys'.
(avy--with-avy-keys): Add obsolete alias.
2015-07-16 16:06:21 +02:00
Oleh Krehel
465d5f2f9c Improve docstrings
* avy.el (avy-keys): Update.
(avy-background-face): Update.
2015-07-16 16:05:33 +02:00
Oleh Krehel
1d1e4b62e8 Allow to switch action midway from goto to kill/mark/copy
* avy.el (avy-action): New defvar.
(avy-dispatch-alist): New defvar.
Customize this to add new dispatch functionality.
(avy-handler-default): Use `avy-dispatch-alist'.
(avy--with-avy-keys): Set `avy-action' to nil, which means
`avy-action-goto' will be called by default.
(avy--goto): Remove defun. Redirect it as an obsolete alias to identity.
(avy-action-goto): New defun.
(avy-action-mark): New defun.
(avy-action-copy): New defun.
(avy-action-kill): New defun.
(avy--process): Call `avy-action'. This function alone now does
what (avy--goto (avy--process ...)) used to do.
(avy--generic-jump): Remove `avy--goto'.
(avy-goto-char-in-line): Remove `avy--goto'.
(avy-isearch): Remove `avy--goto'.
(avy--line): Set `avy-action' to identity so that `avy--process' doesn't
move point.
(avy-goto-line): Replace `avy--goto' with `avy-action-goto'.
(avy-copy-line): `avy--line' now returns a point, not a cons.
(avy-move-line): `avy--line' now returns a point, not a cons.
(avy-copy-region): `avy--line' now returns a point, not a cons.

**Example of use.**

Suppose you have:
(global-set-key (kbd "M-g w") 'avy-goto-word-1)

To jump to a certain word (e.g. first one on screen): "M-g wa".
To copy the word instead of jumping to it:            "M-g wna".
To mark the word after jumping to it:                 "M-g wma".
To kill the word after jumping to it:                 "M-g wxa".

Re #78
2015-07-16 15:13:31 +02:00
Oleh Krehel
7928d11ef3 Remove the old obsolete aliases 2015-07-16 14:25:06 +02:00
Tassilo Horn
0cac5890f1 Allow non-printing keys in avy-keys
Now you can set avy-keys also to the arrow keys and page up/down, e.g.,

  (setq avy-keys '(left right up down prior next))

and those will be displayed as ▲, ▼, ◀, ▶, △, ▽ in the overlays.  The
display is controlled by the variable `avy-key-to-char-alist'.
2015-07-14 08:31:49 +02:00
Oleh Krehel
36e4d145c8 Respect the current input method for target chars
* avy.el (avy-goto-char):
(avy-goto-char-in-line):
(avy-goto-char-2):
(avy-goto-word-1):
(avy-goto-subword-1):
(avy-goto-char-timer): Update.

Fixes #76
2015-07-07 17:11:47 +02:00
Oleh Krehel
eb28aeb40e avy.el (avy-goto-line): push mark for numeric line
Fixes #74
2015-07-01 14:32:04 +02:00
Junpeng Qiu
8c8ad97de1 Add de-bruijn to the defcustom of avy-styles-alist 2015-06-25 15:54:32 -04:00
Oleh Krehel
8d38a898f2 avy.el (avy-goto-char-timer): Obey avy-styles-alist
Fixes #67
2015-06-21 17:04:59 +02:00
Oleh Krehel
44d76b9d2a Bump version to 0.3.0
* doc/Changelog.org: Start tracking the changes in each new version.
0.3.0
2015-06-19 17:59:25 +02:00
Nelson Loyola
a7c92d884f Updated screenshot image for ivy-goto-char.
Fixes #65
Fixes #64
2015-06-17 19:44:30 +02:00
Oleh Krehel
e5104ca416 avy.el (avy-goto-word-1): Quote punctuation
Fixes #63
2015-06-15 19:48:08 +02:00
Oleh Krehel
7b0ba80620 avy.el (avy-style): Switch the default from 'pre to 'at-full 2015-06-15 16:25:49 +02:00
Oleh Krehel
7376a0c611 avy.el (avy--overlay-at-full): Fixup (for overlays-in)
* avy.el (avy--overlay-at-full): Account for `overlays-in' not being
  returned in the buffer order sometimes: it seems to be random order.
  Instead, look at the minimum of all overlay starts that are on the
  current line.

Fixes #52.
2015-06-15 16:17:58 +02:00
Oleh Krehel
15c7f9fe39 targets/avy-init.el: Use the new checkdoc-file
* targets/avy-init.el (checkdoc-file): This function is now available in
  trunk Emacs.
2015-06-08 13:07:52 +02:00
Oleh Krehel
054390f5f6 avy.el (avy-translate-char-function): Fixup doc 2015-06-08 13:04:31 +02:00
Tim Perkins
236293a401 avy.el (avy-isearch): Allow different styles
Fixes #61
2015-06-06 16:41:57 -04:00
York Zhao
035d663ab4 Add `avy-translate-char-function' to translate user input key
This can be useful for adding mirror key. For example, one can make SPACE an
alternative of 'a', by adding:

(setq avy-translate-char-function
      (lambda (c) (if (= c 32) ?a c)))

to allow typing SPACE instead of character 'a' to jump to the location
highlighted by 'a'.

Fixes #59
2015-06-04 17:37:59 +02:00
Oleh Krehel
02bf35b6a0 Modify at-full' and de-bruijn' overlays to color depth
* avy.el (avy-lead-face-2): New face.
(avy-lead-faces): New defconst. Each element will be used to color the
corresponding depth.
(avy--overlay-at-full): Use `avy-lead-faces' to represent the current
decision depth. For `de-bruijn', prepend the old stuff, so that nothing
moves.

Fixes #53
2015-06-03 18:19:00 +02:00
Oleh Krehel
6dfa445e07 README.md: Mention a custom-command tutorial
Fixes #55
2015-06-03 17:30:14 +02:00
Oleh Krehel
27b3da3f4b avy.el (avy-goto-char-in-line): Fix to this window
Fixes #58
2015-06-02 18:54:04 +02:00
Oleh Krehel
fc93fe676c avy.el (avy-ignored-modes): New defcustom.
* avy.el (avy-dowindows): Use `avy-ignored-modes'.

Fixes #57
2015-06-02 17:38:38 +02:00
Oleh Krehel
7a008217e3 avy.el (avy-dowindows): Ignore pdf-view-mode
Fixes #57
2015-06-02 16:59:57 +02:00
Oleh Krehel
1350ab318e avy.el (avy-goto-char-in-line): Quote char
Fixes #56
2015-06-02 16:57:50 +02:00
Oleh Krehel
78d20e0b02 Fix jumping to other frames
* avy.el (avy--goto): Select the window frame if needed.

Fixes #54
2015-05-30 10:11:04 +02:00
Oleh Krehel
9ddde6dd79 avy.el (avy--overlay-at-full): Improve
Re #51
2015-05-26 16:59:01 +02:00
Oleh Krehel
b5e02ac61c Fixup byte-compile warnings
* avy.el (avy-tree): Move.
2015-05-26 16:05:05 +02:00
Oleh Krehel
55c77c5eb8 For De Bruin, don't build a tree
* avy.el (avy--group-by): Remove.
(avy--path-alist-to-tree): Remove.
(avy-tree-de-bruijn): Remove.
(avy-read-de-bruijn): New defun.
(avy--process): Update.

Instead of building a tree (from a flat sequence) and traversing it,
just use the flat sequence.  This has the advantage of candidates being
in proper buffer-sequential order.

Re #51
Re #5
2015-05-26 15:40:21 +02:00
Tassilo Horn
27b98bb730 Add 'de-bruijn option for avy-style
* avy.el (avy-style): New choice option.
(avy--de-bruijn): New defun.
(avy--path-alist-1): New defun.
(avy--group-by): New defun.
(avy--path-alist-to-tree): New defun.
(avy-tree-de-bruijn): New defun, semi-compatible with `avy-tree'.
(avy--process): Use `avy-tree-de-bruijn' when `avy-style' is 'de-bruijn.
(avy--style-fn): Use `avy--overlay-at-full' when `avy-style' is
'de-bruijn.

Fixes #51
Re #5

TODO: When tree produced by `avy-tree-de-bruijn' is traversed
depth-first, the results should be in-order of their appearance in the
window. Only in this case the overlay functions will work correctly,
since they need to be applied sequentially from window end to window
start.
2015-05-26 14:30:41 +02:00
Oleh Krehel
791c16c6ac avy.el (avy-goto-char-in-line): New command
Fixes #49
2015-05-25 10:12:17 +02:00