Reformat map! docstring

Mention correct placement of state keyword.
This commit is contained in:
Henrik Lissner 2020-11-14 14:02:07 -05:00
parent a14fb64c0c
commit ed1996e6f9
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -387,21 +387,6 @@ For example, :nvi will map to (list 'normal 'visual 'insert). See
If evil isn't loaded, evil-specific bindings are ignored. If evil isn't loaded, evil-specific bindings are ignored.
States
:n normal
:v visual
:i insert
:e emacs
:o operator
:m motion
:r replace
:g global (binds the key without evil `current-global-map')
These can be combined in any order, e.g. :nvi will apply to normal, visual and
insert mode. The state resets after the following key=>def pair. If states are
omitted the keybind will be global (no emacs state; this is different from
evil's Emacs state and will work in the absence of `evil-mode').
Properties Properties
:leader [...] an alias for (:prefix doom-leader-key ...) :leader [...] an alias for (:prefix doom-leader-key ...)
:localleader [...] bind to localleader; requires a keymap :localleader [...] bind to localleader; requires a keymap
@ -418,7 +403,30 @@ Properties
:unless [CONDITION] [...] :unless [CONDITION] [...]
Any of the above properties may be nested, so that they only apply to a Any of the above properties may be nested, so that they only apply to a
certain group of keybinds." certain group of keybinds.
States
:n normal
:v visual
:i insert
:e emacs
:o operator
:m motion
:r replace
:g global (binds the key without evil `current-global-map')
These can be combined in any order, e.g. :nvi will apply to normal, visual and
insert mode. The state resets after the following key=>def pair. If states are
omitted the keybind will be global (no emacs state; this is different from
evil's Emacs state and will work in the absence of `evil-mode').
These must be placed right before the key string.
Do
(map! :leader :desc \"Description\" :n \"C-c\" #'dosomething)
Don't
(map! :n :leader :desc \"Description\" \"C-c\" #'dosomething)
(map! :leader :n :desc \"Description\" \"C-c\" #'dosomething)"
(doom--map-process rest)) (doom--map-process rest))
(provide 'core-keybinds) (provide 'core-keybinds)