Replace ace-jump-mode with avy
This commit is contained in:
parent
30fea6d9d6
commit
b2947f2164
6 changed files with 17 additions and 16 deletions
|
@ -279,7 +279,6 @@ Keybinding | Description
|
||||||
<kbd>F12</kbd> | Toggle the Emacs menu bar.
|
<kbd>F12</kbd> | Toggle the Emacs menu bar.
|
||||||
<kbd>C-x g</kbd> | Open Magit's status buffer.
|
<kbd>C-x g</kbd> | Open Magit's status buffer.
|
||||||
<kbd>M-Z</kbd> | Zap up to char.
|
<kbd>M-Z</kbd> | Zap up to char.
|
||||||
<kbd>C-c J</kbd> or <kbd>Super-></kbd> | Switch between buffers with [`ace-jump-buffer`](https://github.com/waymondo/ace-jump-buffer)
|
|
||||||
<kbd>C-=</kbd> | Run `expand-region` (incremental text selection).
|
<kbd>C-=</kbd> | Run `expand-region` (incremental text selection).
|
||||||
<kbd>C-a</kbd> | Run `prelude-move-beginning-of-line`. Read [this](http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/) for details.
|
<kbd>C-a</kbd> | Run `prelude-move-beginning-of-line`. Read [this](http://emacsredux.com/blog/2013/05/22/smarter-navigation-to-the-beginning-of-a-line/) for details.
|
||||||
|
|
||||||
|
@ -429,9 +428,9 @@ buffer. Passing prefix argument **BEFORE** =helm-M-x= **has no effect**.
|
||||||
|
|
||||||
Keybinding | Description
|
Keybinding | Description
|
||||||
-------------------|----------------------------------------------
|
-------------------|----------------------------------------------
|
||||||
<kbd>jj</kbd> | Jump to the beginning of a word(`ace-jump-word-mode`)
|
<kbd>jj</kbd> | Jump to the beginning of a word(`avy-goto-word-1`)
|
||||||
<kbd>jk</kbd> | Jump to a character(`ace-jump-char-mode`)
|
<kbd>jk</kbd> | Jump to a character(`avy-goto-char`)
|
||||||
<kbd>jl</kbd> | Jump to the beginning of a line(`ace-jump-line-mode`)
|
<kbd>jl</kbd> | Jump to the beginning of a line(`avy-goto-line`)
|
||||||
<kbd>JJ</kbd> | Jump back to previous buffer(`prelude-switch-to-previous-buffer`)
|
<kbd>JJ</kbd> | Jump back to previous buffer(`prelude-switch-to-previous-buffer`)
|
||||||
<kbd>uu</kbd> | View edits as a tree(`undo-tree-visualize`)
|
<kbd>uu</kbd> | View edits as a tree(`undo-tree-visualize`)
|
||||||
<kbd>xx</kbd> | Executed extended command(`execute-extended-command`)
|
<kbd>xx</kbd> | Executed extended command(`execute-extended-command`)
|
||||||
|
|
|
@ -259,6 +259,12 @@ The body of the advice is in BODY."
|
||||||
(setq projectile-cache-file (expand-file-name "projectile.cache" prelude-savefile-dir))
|
(setq projectile-cache-file (expand-file-name "projectile.cache" prelude-savefile-dir))
|
||||||
(projectile-global-mode t)
|
(projectile-global-mode t)
|
||||||
|
|
||||||
|
;; avy allows us to effectively navigate to visible things
|
||||||
|
(require 'avy-jump)
|
||||||
|
(setq avy-background t)
|
||||||
|
(setq avy-goto-char-style 'at)
|
||||||
|
(setq avy-goto-word-style 'at)
|
||||||
|
|
||||||
;; anzu-mode enhances isearch & query-replace by showing total matches and current match position
|
;; anzu-mode enhances isearch & query-replace by showing total matches and current match position
|
||||||
(require 'anzu)
|
(require 'anzu)
|
||||||
(diminish 'anzu-mode)
|
(diminish 'anzu-mode)
|
||||||
|
|
|
@ -112,10 +112,8 @@
|
||||||
|
|
||||||
(global-set-key (kbd "C-=") 'er/expand-region)
|
(global-set-key (kbd "C-=") 'er/expand-region)
|
||||||
|
|
||||||
(global-set-key (kbd "C-c j") 'ace-jump-mode)
|
(global-set-key (kbd "C-c j") 'avy-goto-word-1)
|
||||||
(global-set-key (kbd "s-.") 'ace-jump-mode)
|
(global-set-key (kbd "s-.") 'avy-goto-word-1)
|
||||||
(global-set-key (kbd "C-c J") 'ace-jump-buffer)
|
|
||||||
(global-set-key (kbd "s->") 'ace-jump-buffer)
|
|
||||||
(global-set-key (kbd "s-w") 'ace-window)
|
(global-set-key (kbd "s-w") 'ace-window)
|
||||||
|
|
||||||
(provide 'prelude-global-keybindings)
|
(provide 'prelude-global-keybindings)
|
||||||
|
|
|
@ -42,9 +42,7 @@
|
||||||
(package-initialize)
|
(package-initialize)
|
||||||
|
|
||||||
(defvar prelude-packages
|
(defvar prelude-packages
|
||||||
'(ace-jump-mode
|
'(avy
|
||||||
ace-jump-buffer
|
|
||||||
ace-window
|
|
||||||
anzu
|
anzu
|
||||||
browse-kill-ring
|
browse-kill-ring
|
||||||
dash
|
dash
|
||||||
|
|
|
@ -122,8 +122,8 @@
|
||||||
|
|
||||||
(setq evil-shift-width 2)
|
(setq evil-shift-width 2)
|
||||||
|
|
||||||
;;; enable ace-jump mode with evil-mode
|
;;; enable avy with evil-mode
|
||||||
(define-key evil-normal-state-map (kbd "SPC") 'ace-jump-mode)
|
(define-key evil-normal-state-map (kbd "SPC") 'avy-goto-word-1)
|
||||||
|
|
||||||
;;; snagged from Eric S. Fraga
|
;;; snagged from Eric S. Fraga
|
||||||
;;; http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00153.html
|
;;; http://lists.gnu.org/archive/html/emacs-orgmode/2012-05/msg00153.html
|
||||||
|
|
|
@ -35,9 +35,9 @@
|
||||||
|
|
||||||
(require 'key-chord)
|
(require 'key-chord)
|
||||||
|
|
||||||
(key-chord-define-global "jj" 'ace-jump-word-mode)
|
(key-chord-define-global "jj" 'avy-goto-word-1)
|
||||||
(key-chord-define-global "jl" 'ace-jump-line-mode)
|
(key-chord-define-global "jl" 'avy-goto-line)
|
||||||
(key-chord-define-global "jk" 'ace-jump-char-mode)
|
(key-chord-define-global "jk" 'avy-goto-char)
|
||||||
(key-chord-define-global "JJ" 'prelude-switch-to-previous-buffer)
|
(key-chord-define-global "JJ" 'prelude-switch-to-previous-buffer)
|
||||||
(key-chord-define-global "uu" 'undo-tree-visualize)
|
(key-chord-define-global "uu" 'undo-tree-visualize)
|
||||||
(key-chord-define-global "xx" 'execute-extended-command)
|
(key-chord-define-global "xx" 'execute-extended-command)
|
||||||
|
|
Loading…
Reference in a new issue