bind avy-goto-line to `SPC y`
After the change in 1d340dcc77
,
there was some grumbling in gitter that `SPC L` is not as convenient
as `SPC l`. Apparently avy-goto-line is a popular function.
`SPC y` is chosen because it is:
- currently unused (as far as I can tell).
- sort of mnemonic because "avy" has a "y" in it.
- doesn't require SHIFT to type
- is accessible even on non-US keyboards
(there were suggestions such ";" and "\" that are not as accessible
on non-US keyboards)
This change also updates the documentation regarding the change from
ace-jump-mode to avy.
This commit is contained in:
parent
fd95f9090f
commit
5559060ab5
|
@ -96,7 +96,7 @@
|
|||
- [[Navigating][Navigating]]
|
||||
- [[Point/Cursor][Point/Cursor]]
|
||||
- [[Smooth scrolling][Smooth scrolling]]
|
||||
- [[Vim motions with ace-jump mode][Vim motions with ace-jump mode]]
|
||||
- [[Vim motions with avy][Vim motions with avy]]
|
||||
- [[ace-link mode][ace-link mode]]
|
||||
- [[Window manipulation][Window manipulation]]
|
||||
- [[Window manipulation key bindings][Window manipulation key bindings]]
|
||||
|
@ -1432,23 +1432,23 @@ On Windows, you may want to disable it. To disable the smooth scrolling set the
|
|||
(setq-default dotspacemacs-smooth-scrolling t)
|
||||
#+END_SRC
|
||||
|
||||
*** Vim motions with ace-jump mode
|
||||
Spacemacs uses the =evil= integration of [[https://github.com/winterTTr/ace-jump-mode][ace-jump mode]] which enables the
|
||||
invocation of =ace-jump-mode= during motions.
|
||||
*** Vim motions with avy
|
||||
Spacemacs uses the =evil= integration of [[https://github.com/abo-abo/avy][avy]] which enables the
|
||||
invocation of =avy= during motions.
|
||||
|
||||
It is useful for deleting visually a set of lines, try the following sequence in
|
||||
a buffer containing some text: ~d SPC L~
|
||||
a buffer containing some text: ~d SPC y~
|
||||
|
||||
| Key Binding | Description |
|
||||
|-------------+----------------------------------------------------|
|
||||
| ~SPC SPC~ | initiate ace jump word mode |
|
||||
| ~SPC L~ | initiate ace jump line mode |
|
||||
| ~SPC SPC~ | initiate avy jump word |
|
||||
| ~SPC y~ | initiate avy jump line |
|
||||
| ~SPC `~ | go back to the previous location (before the jump) |
|
||||
|
||||
*Hint*: you may change to char mode by ~C-c C-c~ in word mode.
|
||||
|
||||
**** ace-link mode
|
||||
Similar to =ace-jump-mode=, [[https://github.com/abo-abo/ace-link][ace-link]] allows one to jump to any link in
|
||||
Similar to =avy=, [[https://github.com/abo-abo/ace-link][ace-link]] allows one to jump to any link in
|
||||
=help-mode= and =info-mode= with two key strokes.
|
||||
|
||||
| Key Binding | Description |
|
||||
|
@ -2389,7 +2389,7 @@ Comments are handled by [[https://github.com/redguardtoo/evil-nerd-commenter][ev
|
|||
| ~SPC c y~ | comment and yank |
|
||||
| ~SPC c Y~ | invert comment and yank |
|
||||
|
||||
*Tips:* To comment efficiently a block of line use the combo ~SPC ; SPC L~
|
||||
*Tips:* To comment efficiently a block of line use the combo ~SPC ; SPC y~
|
||||
|
||||
*** Deleting files
|
||||
Deletion is configured to send deleted files to system trash.
|
||||
|
|
|
@ -72,13 +72,13 @@ check out the =packages.el= file in the respective folders in the
|
|||
|
||||
** How can I change or define an alias for an =evil-leader= prefix?
|
||||
It is possible to change an =evil-leader= prefix by binding its keymap to
|
||||
another sequence. For instance, if you want to switch ~SPC L~
|
||||
another sequence. For instance, if you want to switch ~SPC y~
|
||||
(=evil-avy-goto-line=) with ~SPC l~ (=perspectives= layer) to make the later
|
||||
easier to reach, you can use:
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(evil-leader/set-key
|
||||
"L" (lookup-key evil-leader--default-map "l")
|
||||
"y" (lookup-key evil-leader--default-map "l")
|
||||
"l" 'evil-avy-goto-line)
|
||||
#+end_src
|
||||
|
||||
|
|
|
@ -399,7 +399,7 @@
|
|||
(setq avy-background t)
|
||||
(evil-leader/set-key
|
||||
"SPC" 'avy-goto-word-or-subword-1
|
||||
"L" 'avy-goto-line
|
||||
"y" 'avy-goto-line
|
||||
"xo" 'spacemacs/avy-open-url))
|
||||
:config
|
||||
(progn
|
||||
|
|
|
@ -29,5 +29,5 @@ To use this contribution add it to your =~/.spacemacs=.
|
|||
| ~SPC ;~ | comment operator |
|
||||
| ~gcc~ | comment current line |
|
||||
| ~gcap~ | comment paragraphs |
|
||||
| ~gc SPC L~ | comment up to a line with avy |
|
||||
| ~gc SPC y~ | comment up to a line with avy |
|
||||
| ~gy~ | comment and yank |
|
||||
|
|
Loading…
Reference in New Issue