Adds spell checking transient state
This commit is contained in:
parent
4148d567d4
commit
c57dd4870a
|
@ -11,6 +11,7 @@
|
||||||
- [[#enabling-multi-dictionary-support-with-hunspell][Enabling multi-dictionary support with hunspell]]
|
- [[#enabling-multi-dictionary-support-with-hunspell][Enabling multi-dictionary support with hunspell]]
|
||||||
- [[#enable-auto-completion-popup][Enable auto-completion popup]]
|
- [[#enable-auto-completion-popup][Enable auto-completion popup]]
|
||||||
- [[#key-bindings][Key Bindings]]
|
- [[#key-bindings][Key Bindings]]
|
||||||
|
- [[#spell-checking-transient-state][Spell Checking Transient-state]]
|
||||||
- [[#known-issues][Known issues]]
|
- [[#known-issues][Known issues]]
|
||||||
|
|
||||||
* Description
|
* Description
|
||||||
|
@ -127,6 +128,18 @@ set the layer variable =enable-flyspell-auto-completion= to t:
|
||||||
| ~SPC S n~ | flyspell goto next error |
|
| ~SPC S n~ | flyspell goto next error |
|
||||||
| ~SPC t S~ | toggle flyspell |
|
| ~SPC t S~ | toggle flyspell |
|
||||||
|
|
||||||
|
** Spell Checking Transient-state
|
||||||
|
|
||||||
|
| Key Binding | Description |
|
||||||
|
|-------------+--------------------------------------------------|
|
||||||
|
| ~SPC g . b~ | Rerun spell check for the whole buffer |
|
||||||
|
| ~SPC g . d~ | Change dictionary |
|
||||||
|
| ~SPC g . n~ | Go to next spelling error |
|
||||||
|
| ~SPC g . c~ | Correct word under cursor |
|
||||||
|
| ~SPC g . t~ | Toggle spell check |
|
||||||
|
| ~SPC g . q~ | Quit transient state |
|
||||||
|
| ~SPC g . Q~ | Quit transient state and disable =flyspell-mode= |
|
||||||
|
|
||||||
* Known issues
|
* Known issues
|
||||||
Vim-empty-lines layer seems incompatible with spell-checking inside org-mode. If
|
Vim-empty-lines layer seems incompatible with spell-checking inside org-mode. If
|
||||||
you experience "Args out of range" error message when invoking ~SPC S c~ inside
|
you experience "Args out of range" error message when invoking ~SPC S c~ inside
|
||||||
|
|
|
@ -44,6 +44,27 @@
|
||||||
:commands (spell-checking/change-dictionary)
|
:commands (spell-checking/change-dictionary)
|
||||||
:init
|
:init
|
||||||
(progn
|
(progn
|
||||||
|
(spacemacs|define-transient-state spell-checking
|
||||||
|
:title "Spell Checking Transient State"
|
||||||
|
:doc "
|
||||||
|
Spell Commands^^ Other
|
||||||
|
--------------^^ -----
|
||||||
|
[_b_] check whole buffer [_t_] toggle spell check
|
||||||
|
[_d_] change dictionary [_q_] exit
|
||||||
|
[_n_] next spell error [_Q_] exit and disable spell check
|
||||||
|
[_c_] correct word
|
||||||
|
"
|
||||||
|
:on-enter (flyspell-mode)
|
||||||
|
:bindings
|
||||||
|
("b" flyspell-buffer)
|
||||||
|
("d" spell-checking/change-dictionary)
|
||||||
|
("n" flyspell-goto-next-error)
|
||||||
|
("c" flyspell-correct-previous-word-generic)
|
||||||
|
("Q" flyspell-mode :exit t)
|
||||||
|
("q" nil :exit t)
|
||||||
|
("t" spacemacs/toggle-spelling-checking))
|
||||||
|
|
||||||
|
(spacemacs/set-leader-keys "S." 'spacemacs/spell-checking-transient-state/body)
|
||||||
(spell-checking/add-flyspell-hook 'text-mode-hook)
|
(spell-checking/add-flyspell-hook 'text-mode-hook)
|
||||||
(when spell-checking-enable-by-default
|
(when spell-checking-enable-by-default
|
||||||
(add-hook 'prog-mode-hook 'flyspell-prog-mode))
|
(add-hook 'prog-mode-hook 'flyspell-prog-mode))
|
||||||
|
|
Loading…
Reference in New Issue