all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Question Regarding Trying To Implement Yasnippet Templates To Wrap Source Blocks Around Regions
@ 2022-01-06 18:58 Samuel Banya
  2022-01-06 19:21 ` Yuri Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Samuel Banya @ 2022-01-06 18:58 UTC (permalink / raw)
  To: Emanuel Berg

Hey there,

I'm trying to figure out how to utilize a Yasnippet template to wrap a source block around a section of code that I've highlighted.

Here's the template I used in '/home/sam/hub/dotfiles/emacs/.emacs.d/snippets/org-mode':

# -*- mode: snippet -*-
# name: wrapsrc
# key: C-;
# expand-env: ((yas-wrap-around-region t))
# --
#+begin_src $1
  $0
#+end_src

Here are the links I tried referring to as references:
https://joaotavora.github.io/yasnippet/snippet-reference.html#yas-wrap-around-region

https://gist.github.com/kazu634/290872

https://emacs.stackexchange.com/questions/35557/how-can-i-define-a-yasnippet-for-if-and-if

https://stackoverflow.com/questions/9082999/how-to-insert-a-latex-environment-around-a-block-of-text-in-emacs

Any ideas on how to do this?

Thanks,

Sam


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-06 21:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-06 18:58 Question Regarding Trying To Implement Yasnippet Templates To Wrap Source Blocks Around Regions Samuel Banya
2022-01-06 19:21 ` Yuri Khan
2022-01-06 21:42   ` Samuel Banya

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.