This is an integration between the marvellous org-capture and the amazing YASnippet and the fabulous Yankpad.
Just put the .el
file in your lisp scripts directory and load it
like this:
(use-package ya-org-capture
:after yankpad
:load-path "~/.emacs.d/lisp"
:config
(ya-org-capture/setup))
Now any time you define a org-capture template, you can integrate the powerful templating systems of Yankpad and YASnippet.
This is an example of capture template:
(setq org-capture-templates
`(("i" "some yasnippet capture template" entry (file "/tmp/test.org") "* TODO %^{Some title} \n%(ya-org-capture/make-snippet \"img_\")" :empty-lines 2)
("s" "some yankpad capture template" entry (file "/tmp/test.org") "* TODO %^{Some title} \n%(ya-org-capture/make-snippet \"st\")" :empty-lines 2)))
Please check out these components docs (here, here, and here) and authors because their work may give you great benefits!