docs/api: add lambda! demos
This commit is contained in:
parent
008c14640b
commit
33dfe85c66
1 changed files with 9 additions and 1 deletions
10
docs/api.org
10
docs/api.org
|
@ -214,7 +214,15 @@ It is integrated into Helpful, in Doom.
|
||||||
#+RESULTS:
|
#+RESULTS:
|
||||||
: /home/hlissner/.emacs.d/LICENSE
|
: /home/hlissner/.emacs.d/LICENSE
|
||||||
|
|
||||||
*** TODO lambda!
|
*** lambda!
|
||||||
|
#+BEGIN_SRC elisp
|
||||||
|
(map! "C-j" (lambda! (newline) (indent-according-to-mode)))
|
||||||
|
|
||||||
|
;; The `λ!' short-form alias exists. If you have the snippets module enabled and
|
||||||
|
;; Doom's default snippets, the 'lam' snippet will expand into 'λ!'. Otherwise,
|
||||||
|
;; you can use `lambda!'.
|
||||||
|
(map! "C-j" (λ! (newline) (indent-according-to-mode)))
|
||||||
|
#+END_SRC
|
||||||
*** lambda!!
|
*** lambda!!
|
||||||
When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it
|
When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it
|
||||||
inserts N newlines. We can use ~lambda!!~ to easily create a keybinds that bakes
|
inserts N newlines. We can use ~lambda!!~ to easily create a keybinds that bakes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue