diff --git a/docs/api.org b/docs/api.org index 68375bdcc..05ad88ad6 100644 --- a/docs/api.org +++ b/docs/api.org @@ -20,6 +20,8 @@ It is integrated into Helpful, in Doom. - [[#file-exists-p][file-exists-p!]] - [[#cmd][cmd!]] - [[#cmd-1][cmd!!]] + - [[#cmds][cmds!]] + - [[#kbd][kbd!]] - [[#letenv][letenv!]] - [[#load][load!]] - [[#map][map!]] @@ -263,6 +265,32 @@ Or to create aliases for functions that behave differently: (fset 'org-reset-global-visibility (cmd!! #'org-global-cycle '(4)) #+END_SRC +*** cmds! +#+BEGIN_SRC elisp :eval no +(map! :i [tab] (cmds! (and (featurep! :editor snippets) + (bound-and-true-p yas-minor-mode) + (yas-maybe-expand-abbrev-key-filter 'yas-expand)) + #'yas-expand + (featurep! :completion company +tng) + #'company-indent-or-complete-common) + :m [tab] (cmds! (and (bound-and-true-p yas-minor-mode) + (evil-visual-state-p) + (or (eq evil-visual-selection 'line) + (not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\)))))) + #'yas-insert-snippet + (and (featurep! :editor fold) + (save-excursion (end-of-line) (invisible-p (point)))) + #'+fold/toggle + (fboundp 'evil-jump-item) + #'evil-jump-item)) +#+END_SRC + +*** kbd! +#+BEGIN_SRC elisp :eval no +(map! "," (kbd! "SPC") + ";" (kbd! ":")) +#+END_SRC + *** letenv! #+BEGIN_SRC elisp (letenv! (("SHELL" "/bin/sh"))