3

You can set header arguments in Org mode properties (see (org) Using Header Arguments) to avoid repeating, for example, all code blocks in this org file will have :dir /tmp #+PROPERTY: header-args :dir /tmp #+BEGIN_SRC sh pwd #+END_SRC #+RESULTS: : /private/tmp I also have the following command in my init file, it duplicates the last src block's header, ...


2

Your source code block has text set as the mode. Try changing that to read #+BEGIN_SRC snippet :tangle ~/org/snippets/bibtex-mode/article


2

You can disable pairing of <..> as follows: (add-function :before-until electric-pair-inhibit-predicate (lambda (c) (eq c ?<)))


1

Here's an implementation using org-babel-post-tangle-hook as I hinted in my comment: #+PROPERTY: header-args:yasnippet :mkdirp yes :padline no * foo #+begin_src yasnippet :tangle ./snippets/a # key: a # -- a foo bar #+end_src #+begin_src yasnippet :tangle ./snippets/b # key: b # -- b foo bar #+end_src * Code ...


1

You need a list with the class names only: #+LATEX_CLASS: ${2:$$(yas-choose-value (mapcar #'car org-latex-classes))}


1

You can define an abbrev that uses the function you defined: (eval-after-load "perl-mode" (define-abbrev perl-mode-abbrev-table "vd" "" #'print-dumper)) Don't forget to turn on abbrev-mode as a minor mode in your perl buffers: (add-hook 'perl-mode-hook #'abbrev-mode) Alternatively, you can probably define conditional ...


1

I think what you're looking for is to treat the underscore as part of the word, as Vim does. The best answer is probably this one - look at the solution adding advice around evil-inner-word


1

You can delete chars from the buffer during expansion, but modifying the buffer during expansion is dicouraged. Deleting chars is pretty easy, because yasnippet allows to eval elisp code during expansion. You have to put this code into back-quotes Read more about it here. Your snippet would then look like this example (you need to refine this crude example,...


1

You can do this with an extra step (see "Nested placeholder fields" in the manual): \sum${1:_{${2:}}}^{$3} $0 With the optional field: TAB, TAB, insert field 1, TAB, insert field 2, TAB to exit. Without the optional field: TAB, C-d, insert field 2, TAB to exit. Another option is to use a function that deletes the empty field in case it finds one: \sum_{$...


1

In your buffer, M-x yas-visit-snippet-file, then type the name of the snippet you want to edit, or choose from a prompted list. Then it will open a buffer for you to edit. From the buffer you can M-: buffer-file-name to see the path of the file containing the snippet.


Only top voted, non community-wiki answers of a minimum length are eligible