From bf939d36ba1b86c3d3a938e6b715ab7749237834 Mon Sep 17 00:00:00 2001 From: syl20bnr Date: Tue, 23 Sep 2014 21:42:08 -0400 Subject: [PATCH] Use evil integration of ace-jump mode --- README.md | 19 ++++++++++++++----- spacemacs/packages.el | 6 +++--- 2 files changed, 17 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 0b033ae6e..76679866f 100644 --- a/README.md +++ b/README.md @@ -268,12 +268,21 @@ Key Binding | Description ` j l` | go to the end of line (and set a mark at the previous location in the line) ` z z` | lock the cursor at the center of the screen -#### [ace-jump mode][ace-jump] +#### Vim motions with ace-jump mode -Key Binding | Description -------------|------------------------------------------------------------------ -`,` | initiate ace jump -` ,` | go back to the previous location (before the jump) +`Spacemacs` uses the `evil` integration of [ace-jump mode][ace-jump] which +enables the invocation of `ace-jump-mode` during motions. + +It is useful for deleting visually a set of lines, try the following sequence +in a buffer containing some text: + + d l + +Key Binding | Description +--------------|------------------------------------------------------------------ +` ` | initiate ace jump char mode +` l` | initiate ace jump line mode +`` ``` | go back to the previous location (before the jump) #### Buffers and Files diff --git a/spacemacs/packages.el b/spacemacs/packages.el index 5efa1347b..1449ce99e 100644 --- a/spacemacs/packages.el +++ b/spacemacs/packages.el @@ -320,12 +320,12 @@ which require an initialization must be listed explicitly in the list." :init (progn (add-hook 'ace-jump-mode-end-hook 'golden-ratio) - (define-key evil-normal-state-map "," 'ace-jump-mode) - (define-key evil-normal-state-map (kbd "C-,") 'ace-jump-word-mode)) + (evil-leader/set-key "SPC" 'evil-ace-jump-char-mode) + (evil-leader/set-key "l" 'evil-ace-jump-line-mode)) :config (progn ;; ace-jump quick access - (evil-leader/set-key "," 'ace-jump-mode-pop-mark)))) + (evil-leader/set-key "`" 'ace-jump-mode-pop-mark)))) (defun spacemacs/init-auto-complete () (use-package auto-complete