Add vim-style-visual-feedback variable and documentation
This commit is contained in:
parent
309b154d73
commit
e39b3495bd
|
@ -737,6 +737,10 @@ Three styles are available:
|
||||||
- Emacs,
|
- Emacs,
|
||||||
- Hybrid (a mix between Vim and Emacs).
|
- Hybrid (a mix between Vim and Emacs).
|
||||||
|
|
||||||
|
To set the editing style set the variable =dotspacemacs-editing-style= to
|
||||||
|
either =vim=, =hybrid=, or =emacs=. It possible to pass a list of variables
|
||||||
|
as well with the keyword =:variables=, just like for layer variables.
|
||||||
|
|
||||||
*** Vim
|
*** Vim
|
||||||
Spacemacs behaves like in Vim using the [[https://github.com/emacs-evil/evil/][Evil]] mode package to emulate Vim key
|
Spacemacs behaves like in Vim using the [[https://github.com/emacs-evil/evil/][Evil]] mode package to emulate Vim key
|
||||||
bindings. This is the default style of Spacemacs; it can be set explicitly by
|
bindings. This is the default style of Spacemacs; it can be set explicitly by
|
||||||
|
@ -748,6 +752,21 @@ To bind keys in Vim editing style (=insert state=):
|
||||||
(define-key evil-insert-state-map (kbd "C-]") 'forward-char)
|
(define-key evil-insert-state-map (kbd "C-]") 'forward-char)
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
|
When setting the Vim style you can pass any variable supported by =evil-mode=
|
||||||
|
with the keyword =:variables=. Spacemacs also supports the followgin editing
|
||||||
|
style variables for Vim:
|
||||||
|
|
||||||
|
| Variable | Description |
|
||||||
|
|-----------------------------+---------------------------------------------|
|
||||||
|
| =vim-style-visual-feedback= | If non-nil then brief highlights on objects |
|
||||||
|
|
||||||
|
Default configuration is:
|
||||||
|
|
||||||
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
(setq-default dotspacemacs-editing-style '(vim :variables
|
||||||
|
vim-style-visual-feedback t)
|
||||||
|
#+END_SRC
|
||||||
|
|
||||||
*** Emacs
|
*** Emacs
|
||||||
Spacemacs behaves like in raw Emacs using the Holy mode which configures Evil to
|
Spacemacs behaves like in raw Emacs using the Holy mode which configures Evil to
|
||||||
make the =emacs state= the default state everywhere.
|
make the =emacs state= the default state everywhere.
|
||||||
|
|
|
@ -10,5 +10,8 @@
|
||||||
;;; License: GPLv3
|
;;; License: GPLv3
|
||||||
|
|
||||||
|
|
||||||
|
(defvar vim-style-visual-feedback t
|
||||||
|
"If non-nil objects are briefly highlighted performing an action.")
|
||||||
|
|
||||||
(defvar evil-lisp-safe-structural-editing-modes '()
|
(defvar evil-lisp-safe-structural-editing-modes '()
|
||||||
"A list of major mode symbols where safe structural editing is supported.")
|
"A list of major mode symbols where safe structural editing is supported.")
|
||||||
|
|
|
@ -115,9 +115,11 @@
|
||||||
;; disable pulses as it is more distracting than useful and
|
;; disable pulses as it is more distracting than useful and
|
||||||
;; less readable.
|
;; less readable.
|
||||||
(setq evil-goggles-pulse nil
|
(setq evil-goggles-pulse nil
|
||||||
evil-goggles-async-duration 0.2
|
evil-goggles-async-duration 0.1
|
||||||
evil-goggles-blocking-duration 0.12)
|
evil-goggles-blocking-duration 0.05)
|
||||||
(evil-goggles-mode))
|
(if vim-style-visual-feedback
|
||||||
|
(evil-goggles-mode)
|
||||||
|
(evil-googles-mode -1)))
|
||||||
:config
|
:config
|
||||||
(spacemacs|hide-lighter evil-goggles-mode)))
|
(spacemacs|hide-lighter evil-goggles-mode)))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue