|
From: | Samuel Banya |
Subject: | Question Regarding Trying To Implement Yasnippet Templates To Wrap Source Blocks Around Regions |
Date: | Thu, 06 Jan 2022 13:58:06 -0500 |
User-agent: | Cyrus-JMAP/3.5.0-alpha0-4526-gbc24f4957e-fm-20220105.001-gbc24f495 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |