Use avy instead of ace-jump
This commit is contained in:
parent
4d092d38d3
commit
e8c29fe99c
2 changed files with 7 additions and 34 deletions
|
@ -105,43 +105,16 @@
|
||||||
(defadvice undo-tree-save-history-hook (around undo-tree-save-history-shut-up activate)
|
(defadvice undo-tree-save-history-hook (around undo-tree-save-history-shut-up activate)
|
||||||
(shut-up! ad-do-it)))
|
(shut-up! ad-do-it)))
|
||||||
|
|
||||||
(use-package ace-jump-mode
|
(use-package avy
|
||||||
:functions (ace-jump-char-category ace-jump-do)
|
:commands (avy-goto-char-2 avy-goto-line)
|
||||||
:commands (ace-jump-line-mode ace-jump-char-mode
|
:config (setq avy-all-windows nil
|
||||||
ace-jump-word-mode ace-jump-two-chars-mode)
|
avy-background t))
|
||||||
:init (setq ace-jump-mode-scope 'window
|
|
||||||
ace-jump-mode-gray-background t)
|
|
||||||
:config
|
|
||||||
(defun ace-jump-two-chars-mode (&optional query-char query-char-2)
|
|
||||||
"AceJump two chars mode"
|
|
||||||
(interactive)
|
|
||||||
|
|
||||||
(evil-half-cursor)
|
|
||||||
(setq query-char (or query-char (read-char ">")))
|
|
||||||
(setq query-char-2 (or query-char-2 (read-char (concat ">" (string query-char)))))
|
|
||||||
(if (eq (ace-jump-char-category query-char) 'other)
|
|
||||||
(error "[AceJump] Non-printable character"))
|
|
||||||
|
|
||||||
;; others : digit , alpha, punc
|
|
||||||
(setq ace-jump-query-char query-char)
|
|
||||||
(setq ace-jump-current-mode 'ace-jump-char-mode)
|
|
||||||
(ace-jump-do (regexp-quote (concat (char-to-string query-char)
|
|
||||||
(char-to-string query-char-2))))))
|
|
||||||
|
|
||||||
(use-package ace-link
|
|
||||||
:commands (ace-link-info ace-link-help ace-link-compilation ace-link-custom ace-link-org)
|
|
||||||
:init
|
|
||||||
(bind!
|
|
||||||
(:after help-mode :map help-mode-map :m "go" 'ace-link-help)
|
|
||||||
(:after compile :map compilation-mode-map :m "go" 'ace-link-compilation)
|
|
||||||
(:after info :map Info-mode-map :m "go" 'ace-link-info)
|
|
||||||
(:after org :map org-mode-map :m "go" 'ace-link-org)))
|
|
||||||
|
|
||||||
(use-package ace-window
|
(use-package ace-window
|
||||||
:commands ace-window
|
:commands ace-window
|
||||||
:config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
|
:config (setq aw-keys '(?a ?s ?d ?f ?g ?h ?j ?k ?l)
|
||||||
aw-scope 'frame
|
aw-scope 'frame
|
||||||
aw-background nil))
|
aw-background t))
|
||||||
|
|
||||||
;; (use-package emr
|
;; (use-package emr
|
||||||
;; :commands (emr-initialize emr-show-refactor-menu emr-declare-command)
|
;; :commands (emr-initialize emr-show-refactor-menu emr-declare-command)
|
||||||
|
|
|
@ -133,8 +133,8 @@
|
||||||
:n "gx" 'evil-exchange
|
:n "gx" 'evil-exchange
|
||||||
:n "gr" 'narf:eval-region
|
:n "gr" 'narf:eval-region
|
||||||
:v "gR" 'narf:eval-region-and-replace
|
:v "gR" 'narf:eval-region-and-replace
|
||||||
:m "gl" 'narf:goto-line
|
:m "gl" 'avy-goto-line
|
||||||
:m "gs" 'evil-ace-jump-two-chars-mode
|
:m "gs" 'avy-goto-char-2
|
||||||
:m "g]" 'smart-down
|
:m "g]" 'smart-down
|
||||||
:m "g[" 'smart-up
|
:m "g[" 'smart-up
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue