mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
lang/org: expand snippet on TAB in visual mode
This commit is contained in:
@ -400,12 +400,15 @@ another level of headings on each invocation."
|
||||
(defun +org|yas-expand-maybe ()
|
||||
"Tries to expand a yasnippet snippet, if one is available. Made for
|
||||
`org-tab-first-hook'."
|
||||
(when (and (or (not (bound-and-true-p evil-mode))
|
||||
(when (bound-and-true-p yas-minor-mode)
|
||||
(cond ((and (or (not (bound-and-true-p evil-mode))
|
||||
(eq evil-state 'insert))
|
||||
(bound-and-true-p yas-minor-mode)
|
||||
(yas--templates-for-key-at-point))
|
||||
(call-interactively #'yas-expand)
|
||||
t))
|
||||
t)
|
||||
((use-region-p)
|
||||
(call-interactively #'yas-insert-snippet)
|
||||
t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org|cycle-only-current-subtree (&optional arg)
|
||||
|
Reference in New Issue
Block a user