Fixed some yassnippet issues that have been plaguing me.

This commit is contained in:
Howard Abrams 2023-08-25 08:38:03 -07:00
parent 721f1ea8b0
commit e52ba1a143

View file

@ -1624,7 +1624,12 @@ Since auto insertion requires entering data for particular fields, and for that
#+begin_src emacs-lisp
(defun ha-autoinsert-yas-expand()
"Replace text in yasnippet template."
(yas-expand-snippet (buffer-string) (point-min) (point-max)))
(let ((orig-mode major-mode)
(auto-insert-query nil)
(yas-indent-line nil))
(yas/minor-mode 1)
(evil-insert-state)
(yas-expand-snippet (buffer-string) (point-min) (point-max))))
#+end_src
And since I'll be associating snippets with new files all over my configuration, let's make a helper function: