conventions: better evilified buffers section
This commit is contained in:
parent
96ef3d1e9a
commit
ab6ebd0348
|
@ -9,7 +9,7 @@
|
||||||
- [[#user-prefix][User prefix]]
|
- [[#user-prefix][User prefix]]
|
||||||
- [[#major-mode-prefix][Major mode prefix]]
|
- [[#major-mode-prefix][Major mode prefix]]
|
||||||
- [[#micro-state][Micro-state]]
|
- [[#micro-state][Micro-state]]
|
||||||
- [[#evilify-buffers][Evilify buffers]]
|
- [[#evilified-buffers][Evilified buffers]]
|
||||||
- [[#navigation][Navigation]]
|
- [[#navigation][Navigation]]
|
||||||
- [[#n-and-n][n and N]]
|
- [[#n-and-n][n and N]]
|
||||||
- [[#code-navigation][Code Navigation]]
|
- [[#code-navigation][Code Navigation]]
|
||||||
|
@ -71,25 +71,34 @@ buffers are good candidates to be put on ~M-SPC~ and ~s-M-SPC~.
|
||||||
|
|
||||||
It is recommended to add ~q~ to leave the micro-state.
|
It is recommended to add ~q~ to leave the micro-state.
|
||||||
|
|
||||||
*** Evilify buffers
|
*** Evilified buffers
|
||||||
=Spacemacs= offers convenient functions to /evilify/ a buffer.
|
|
||||||
/Evilifying/ a buffer is to set the =evilified state= as the default
|
/Evilifying/ a buffer is to set the =evilified state= as the default
|
||||||
state for the major mode of the buffer.
|
state for the major mode of the buffer.
|
||||||
|
|
||||||
The =evilified state= is derived from the =emacs state= and modify the
|
The =evilified state= is derived from the =emacs state= and modify the
|
||||||
map to: - add ~hjkl~ navigation - add incremental search with ~/~, ~n~
|
map to:
|
||||||
and ~N~ - add =visual state= and =visual line state= - add yank (copy)
|
- add ~hjkl~ navigation
|
||||||
with ~y~ - activate evil-leader key
|
- add scrolling feature on ~C-f~, ~C-b~, ~C-d~ and ~C-u~
|
||||||
|
- ~G~ and ~gg~ to go to the end and beginning of the buffer
|
||||||
|
- add incremental search with ~/~, ~n~ and ~N~
|
||||||
|
- enabling =evil-ex= on ~:~
|
||||||
|
- add =visual state= and =visual line state= on ~v~ and ~V~
|
||||||
|
- add yank on ~y~ _in visual state only_
|
||||||
|
- activate evil-leader key on ~SPC~
|
||||||
|
|
||||||
Setting the =evilified state= to a mode is done by calling the macro
|
Setting the =evilified state= to a mode is done by calling the macro
|
||||||
=evilify= which takes optional parameters to fix the key bindings
|
=spacemacs|evilify-map=.
|
||||||
shadowed by the above modifications.
|
|
||||||
|
|
||||||
To fix the shadowed bindings we capitalize them, for instance: shadowed
|
/Evilification/ rebinds shadowed key bindings according to the following
|
||||||
~h~ is transposed to ~H~, if ~H~ is taken then it is transposed to ~C-h~
|
rules:
|
||||||
and so on...
|
- alphabetic key bindings: ~x~ -> ~X~ -> ~C-x~ -> ~C-X~
|
||||||
|
- ~SPC~ -> ~'~
|
||||||
|
- ~/~ -> ~\~
|
||||||
|
- ~:~ -> ~|~
|
||||||
|
- ~C-g~ cannot be shadowed
|
||||||
|
|
||||||
Example of /evilified/ buffers are =magit status=, =paradox buffer=.
|
If a key binding cannot be remapped then it is ignored and a warning message
|
||||||
|
is displayed in =*Messages*=.
|
||||||
|
|
||||||
*** Navigation
|
*** Navigation
|
||||||
**** n and N
|
**** n and N
|
||||||
|
|
Loading…
Reference in a new issue